mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-01-10 11:30:30 +05:30
fix: only display playlist video count if ge zero
This commit is contained in:
parent
2b56f0ac0c
commit
83d9efeafd
@ -378,9 +378,10 @@ class PlaylistFragment : DynamicLayoutManagerFragment() {
|
|||||||
|
|
||||||
@SuppressLint("StringFormatInvalid", "StringFormatMatches")
|
@SuppressLint("StringFormatInvalid", "StringFormatMatches")
|
||||||
private fun getChannelAndVideoString(playlist: Playlist, count: Int): String {
|
private fun getChannelAndVideoString(playlist: Playlist, count: Int): String {
|
||||||
return playlist.uploader?.let {
|
if (count < 0) return playlist.uploader.orEmpty()
|
||||||
getString(R.string.uploaderAndVideoCount, it, count)
|
if (playlist.uploader == null) return getString(R.string.videoCount, count)
|
||||||
} ?: getString(R.string.videoCount, count)
|
|
||||||
|
return getString(R.string.uploaderAndVideoCount, playlist.uploader, count)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fetchNextPage() {
|
private fun fetchNextPage() {
|
||||||
|
Loading…
Reference in New Issue
Block a user