Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/renderer/components/FtListVideo/FtListVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
class="viewCount"
>
<template v-if="channelId !== null || channelName !== null"> • </template>
{{ t('Global.Counts.View Count', { count: parsedViewCount }, viewCount) }}
{{ t('Global.Counts.View Count', { count: isNumberRounded(viewCount) ? formatNumber(viewCount, { notation: 'compact' }) : parsedViewCount }, viewCount) }}
</span>
<span
v-if="uploadedTime !== '' && !isLive"
Expand Down Expand Up @@ -296,7 +296,8 @@ import {
showToast,
toDistractionFreeTitle,
deepCopy,
debounce
debounce,
isNumberRounded
} from '../../helpers/utils.js'
import { deArrowData, deArrowThumbnail } from '../../helpers/sponsorblock.js'
import thumbnailPlaceholder from '../../assets/img/thumbnail_placeholder.svg'
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1113,3 +1113,11 @@ export function throttle(func, wait) {
}
}
}

/**
* @param {number} number
* @returns {boolean}
*/
export function isNumberRounded(number) {
if (number % 1000 === 0) return true
Comment thread
Shadorc marked this conversation as resolved.
Outdated
}