1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-25 04:22:30 +01:00

Add duration comment

This commit is contained in:
Isira Seneviratne 2024-07-29 18:45:02 +05:30
parent 75475da053
commit a885a88e02

View File

@ -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 }