diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c94c591..d1dc4e43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Support for auto-generated channels in Playlet backend +### Fixed + +- Channels sub count in web app + ### Removed - [YouTube.js](https://github.com/LuanRT/YouTube.js) from web app. It is no longer needed, so this reduces app size. diff --git a/playlet-web/src/lib/VideoFeed/ChannelCell.svelte b/playlet-web/src/lib/VideoFeed/ChannelCell.svelte index c89b94a0..b8bcd4ed 100644 --- a/playlet-web/src/lib/VideoFeed/ChannelCell.svelte +++ b/playlet-web/src/lib/VideoFeed/ChannelCell.svelte @@ -8,6 +8,9 @@ export let authorThumbnails: any[] | undefined = undefined; export let channelHandle: string | undefined = undefined; export let subCount: number | undefined = undefined; + export let subCountText: string | undefined = undefined; + export let videoCountText: string | undefined = undefined; + export let authorSubTitle: string | undefined = undefined; // svelte-ignore unused-export-let export let type: string = undefined; @@ -15,7 +18,17 @@ let modal; function getSubCountText() { + if (authorSubTitle) { + return authorSubTitle; + } + if (isNaN(subCount) || subCount < 0) { + if (videoCountText) { + return videoCountText; + } + if (subCountText) { + return subCountText; + } return ""; } @@ -32,7 +45,7 @@
-

{author}

+

{author}

{getSubCountText()}
{channelHandle || ""}