Skip to content

Commit

Permalink
Add duration comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Isira-Seneviratne committed Jul 29, 2024
1 parent 75475da commit a885a88
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit a885a88

Please sign in to comment.