1
0
Fork 0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2026-05-26 12:32:25 +00:00

fallback to number if text format is not available for counts

e.g. subscriber count, view count
This commit is contained in:
bopol 2021-02-10 12:14:37 +01:00 committed by Cadence Ember
parent b58f1515eb
commit 6186be0a13
No known key found for this signature in database
GPG key ID: BC1C2C61CF521B17
4 changed files with 41 additions and 5 deletions

View file

@ -14,6 +14,9 @@ module.exports = [
const subscribed = user.isSubscribed(id)
const instanceOrigin = settings.instance
// normalise info, apply watched status
if (!data.second__subCountText && data.subCount) {
data.second__subCountText = converters.subscriberCountToText(data.subCount)
}
const watchedVideos = user.getWatchedVideos()
if (data.latestVideos) {
data.latestVideos.forEach(video => {