fix(ui): prefetch articleid before mark as read
This commit is contained in:
parent
1b758dfca5
commit
38ab828cf1
@ -75,20 +75,16 @@ fun ReadingPage(
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(readerState.articleId) {
|
||||
Log.i("RLog", "ReadPage: ${readingUiState.articleWithFeed}")
|
||||
readerState.articleId?.let {
|
||||
LaunchedEffect(readerState.articleId, pagingItems.size) {
|
||||
if (pagingItems.isNotEmpty() && readerState.articleId != null) {
|
||||
// Log.i("RLog", "ReadPage: ${readingUiState.articleWithFeed}")
|
||||
readingViewModel.prefetchArticleId(pagingItems)
|
||||
if (readingUiState.isUnread) {
|
||||
readingViewModel.markAsRead()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(readerState.articleId, pagingItems.size) {
|
||||
if (pagingItems.isNotEmpty() && readerState.articleId != null)
|
||||
readingViewModel.prefetchArticleId(pagingItems)
|
||||
}
|
||||
|
||||
Scaffold(
|
||||
containerColor = MaterialTheme.colorScheme.surface,
|
||||
// topBarTonalElevation = tonalElevation.value.dp,
|
||||
|
Loading…
x
Reference in New Issue
Block a user