diff --git a/app/src/main/java/org/schabi/newpipe/ui/screens/PlaylistScreen.kt b/app/src/main/java/org/schabi/newpipe/ui/screens/PlaylistScreen.kt index 01669e3c0..ddd978dc7 100644 --- a/app/src/main/java/org/schabi/newpipe/ui/screens/PlaylistScreen.kt +++ b/app/src/main/java/org/schabi/newpipe/ui/screens/PlaylistScreen.kt @@ -41,6 +41,10 @@ private fun PlaylistScreen( ) { playlistInfo?.let { val streams = streamFlow.collectAsLazyPagingItems() + + // Paging's load states only indicate when loading is currently happening, not if it can/will + // happen. As such, the duration initially displayed will be the incomplete duration if more + // items can be loaded. val totalDuration by remember { derivedStateOf { streams.itemSnapshotList.sumOf { it!!.duration }