diff --git a/app/src/main/java/me/ash/reader/ui/page/home/reading/ReadingPage.kt b/app/src/main/java/me/ash/reader/ui/page/home/reading/ReadingPage.kt index b10c1cc79..76733fc9a 100644 --- a/app/src/main/java/me/ash/reader/ui/page/home/reading/ReadingPage.kt +++ b/app/src/main/java/me/ash/reader/ui/page/home/reading/ReadingPage.kt @@ -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,