mirror of https://github.com/readrops/Readrops.git
Fix crash for some feeds in TimelineTab
This commit is contained in:
parent
16e70519e4
commit
da51f504e4
|
@ -321,15 +321,18 @@ object TimelineTab : Tab {
|
||||||
count = items.itemCount,
|
count = items.itemCount,
|
||||||
key = items.itemKey { it.item.id },
|
key = items.itemKey { it.item.id },
|
||||||
) { itemCount ->
|
) { itemCount ->
|
||||||
val itemWithFeed = items[itemCount]!!
|
val itemWithFeed = items[itemCount]
|
||||||
|
|
||||||
|
if (itemWithFeed != null) {
|
||||||
TimelineItem(
|
TimelineItem(
|
||||||
itemWithFeed = itemWithFeed,
|
itemWithFeed = itemWithFeed,
|
||||||
onClick = {
|
onClick = {
|
||||||
viewModel.setItemRead(itemWithFeed.item)
|
viewModel.setItemRead(itemWithFeed.item)
|
||||||
navigator.push(ItemScreen())
|
navigator.push(ItemScreen(itemWithFeed.item.id))
|
||||||
|
},
|
||||||
|
onFavorite = {
|
||||||
|
viewModel.updateStarState(itemWithFeed.item)
|
||||||
},
|
},
|
||||||
onFavorite = { viewModel.updateStarState(itemWithFeed.item) },
|
|
||||||
onShare = {
|
onShare = {
|
||||||
viewModel.shareItem(itemWithFeed.item, context)
|
viewModel.shareItem(itemWithFeed.item, context)
|
||||||
},
|
},
|
||||||
|
@ -337,6 +340,7 @@ object TimelineTab : Tab {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PullToRefreshContainer(
|
PullToRefreshContainer(
|
||||||
state = pullToRefreshState,
|
state = pullToRefreshState,
|
||||||
|
|
Loading…
Reference in New Issue