diff --git a/appcompose/src/main/java/com/readrops/app/compose/timelime/TimelineTab.kt b/appcompose/src/main/java/com/readrops/app/compose/timelime/TimelineTab.kt index efea00cd..0ae5ed96 100644 --- a/appcompose/src/main/java/com/readrops/app/compose/timelime/TimelineTab.kt +++ b/appcompose/src/main/java/com/readrops/app/compose/timelime/TimelineTab.kt @@ -321,20 +321,24 @@ object TimelineTab : Tab { count = items.itemCount, key = items.itemKey { it.item.id }, ) { itemCount -> - val itemWithFeed = items[itemCount]!! + val itemWithFeed = items[itemCount] - TimelineItem( - itemWithFeed = itemWithFeed, - onClick = { - viewModel.setItemRead(itemWithFeed.item) - navigator.push(ItemScreen()) - }, - onFavorite = { viewModel.updateStarState(itemWithFeed.item) }, - onShare = { - viewModel.shareItem(itemWithFeed.item, context) - }, - compactLayout = true - ) + if (itemWithFeed != null) { + TimelineItem( + itemWithFeed = itemWithFeed, + onClick = { + viewModel.setItemRead(itemWithFeed.item) + navigator.push(ItemScreen(itemWithFeed.item.id)) + }, + onFavorite = { + viewModel.updateStarState(itemWithFeed.item) + }, + onShare = { + viewModel.shareItem(itemWithFeed.item, context) + }, + compactLayout = true + ) + } } }