From 8fd402b5ceb4d4ccefb2b92965182c653c1ea19f Mon Sep 17 00:00:00 2001 From: vfsfitvnm Date: Thu, 6 Oct 2022 09:20:42 +0200 Subject: [PATCH] Do not drop last song in quick picks if trending song is null --- .../kotlin/it/vfsfitvnm/vimusic/ui/screens/home/QuickPicks.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/home/QuickPicks.kt b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/home/QuickPicks.kt index 75cfa1e..0141d2a 100644 --- a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/home/QuickPicks.kt +++ b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/home/QuickPicks.kt @@ -191,7 +191,7 @@ fun QuickPicks( } items( - items = related.songs?.dropLast(1) ?: emptyList(), + items = related.songs?.dropLast(if (trending == null) 0 else 1) ?: emptyList(), key = Innertube.SongItem::key ) { song -> SongItem(