Adjust manga FAB to only say "Start" if there's no unread chapters in unfiltered list

Closes #9479
This commit is contained in:
arkon
2023-07-07 17:57:29 -04:00
parent 53c6230afe
commit cf3f2d0380
2 changed files with 10 additions and 9 deletions

View File

@@ -258,7 +258,7 @@ private fun MangaScreenSmallImpl(
) {
val chapterListState = rememberLazyListState()
val chapters = remember(state) { state.processedChapters.toList() }
val chapters = remember(state) { state.processedChapters }
val internalOnBackPressed = {
if (chapters.fastAny { it.selected }) {
@@ -320,7 +320,7 @@ private fun MangaScreenSmallImpl(
) {
ExtendedFloatingActionButton(
text = {
val id = if (chapters.fastAny { it.chapter.read }) {
val id = if (state.chapters.fastAny { it.chapter.read }) {
R.string.action_resume
} else {
R.string.action_start
@@ -485,7 +485,7 @@ fun MangaScreenLargeImpl(
val layoutDirection = LocalLayoutDirection.current
val density = LocalDensity.current
val chapters = remember(state) { state.processedChapters.toList() }
val chapters = remember(state) { state.processedChapters }
val insetPadding = WindowInsets.systemBars.only(WindowInsetsSides.Horizontal).asPaddingValues()
var topBarHeight by remember { mutableIntStateOf(0) }
@@ -555,7 +555,7 @@ fun MangaScreenLargeImpl(
) {
ExtendedFloatingActionButton(
text = {
val id = if (chapters.fastAny { it.chapter.read }) {
val id = if (state.chapters.fastAny { it.chapter.read }) {
R.string.action_resume
} else {
R.string.action_start