File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ fun ItemList(
9797 }
9898
9999 items(items.itemCount) {
100- val item = items[it]!!
100+ val item = items[it]
101101 val isSelected = selectedStream == item
102102
103103 // TODO: Implement playlist and channel grid items.
Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ fun HistoryScreen(viewModel: HistoryViewModel = viewModel()) {
5757 val context = LocalContext .current
5858 val sortKey by viewModel.sortKey.collectAsStateWithLifecycle()
5959 val historyItems = viewModel.historyItems.collectAsLazyPagingItems()
60- val queue = SinglePlayQueue (historyItems.itemSnapshotList.map { it!! .toStreamInfoItem() }, 0 )
60+
61+ val streams = historyItems.itemSnapshotList.mapNotNull { it?.toStreamInfoItem() }
62+ val queue = SinglePlayQueue (streams, 0 )
6163 val onClickBackground = {
6264 NavigationHelper .playOnBackgroundPlayer(context, queue, false )
6365 }
You can’t perform that action at this time.
0 commit comments