Skip to content

Commit

Permalink
Merge pull request #6900 from Bnyro/master
Browse files Browse the repository at this point in the history
fix: only display playlist video count if ge zero
  • Loading branch information
Bnyro authored Dec 20, 2024
2 parents 2b56f0a + 83d9efe commit d29d178
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,10 @@ class PlaylistFragment : DynamicLayoutManagerFragment() {

@SuppressLint("StringFormatInvalid", "StringFormatMatches")
private fun getChannelAndVideoString(playlist: Playlist, count: Int): String {
return playlist.uploader?.let {
getString(R.string.uploaderAndVideoCount, it, count)
} ?: getString(R.string.videoCount, count)
if (count < 0) return playlist.uploader.orEmpty()
if (playlist.uploader == null) return getString(R.string.videoCount, count)

return getString(R.string.uploaderAndVideoCount, playlist.uploader, count)
}

private fun fetchNextPage() {
Expand Down

0 comments on commit d29d178

Please sign in to comment.