mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-24 18:08:24 +01:00
Fix downloaded filter unmatched state in manga screen (#8897)
This commit is contained in:
parent
db4ae134aa
commit
768bb7b503
@ -3,7 +3,6 @@ package eu.kanade.presentation.manga
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.ColumnScope
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
@ -76,14 +75,9 @@ fun ChapterSettingsDialog(
|
||||
) {
|
||||
when (page) {
|
||||
0 -> {
|
||||
val forceDownloaded = manga?.forceDownloaded() == true
|
||||
FilterPage(
|
||||
downloadFilter = if (forceDownloaded) {
|
||||
TriStateFilter.ENABLED_NOT
|
||||
} else {
|
||||
manga?.downloadedFilter
|
||||
} ?: TriStateFilter.DISABLED,
|
||||
onDownloadFilterChanged = onDownloadFilterChanged.takeUnless { forceDownloaded },
|
||||
downloadFilter = manga?.downloadedFilter ?: TriStateFilter.DISABLED,
|
||||
onDownloadFilterChanged = onDownloadFilterChanged.takeUnless { manga?.forceDownloaded() == true },
|
||||
unreadFilter = manga?.unreadFilter ?: TriStateFilter.DISABLED,
|
||||
onUnreadFilterChanged = onUnreadFilterChanged,
|
||||
bookmarkedFilter = manga?.bookmarkedFilter ?: TriStateFilter.DISABLED,
|
||||
@ -158,7 +152,7 @@ private fun SetAsDefaultDialog(
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun ColumnScope.FilterPage(
|
||||
private fun FilterPage(
|
||||
downloadFilter: TriStateFilter,
|
||||
onDownloadFilterChanged: ((TriStateFilter) -> Unit)?,
|
||||
unreadFilter: TriStateFilter,
|
||||
@ -184,7 +178,7 @@ private fun ColumnScope.FilterPage(
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun ColumnScope.SortPage(
|
||||
private fun SortPage(
|
||||
sortingMode: Long,
|
||||
sortDescending: Boolean,
|
||||
onItemSelected: (Long) -> Unit,
|
||||
@ -207,7 +201,7 @@ private fun ColumnScope.SortPage(
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun ColumnScope.DisplayPage(
|
||||
private fun DisplayPage(
|
||||
displayMode: Long,
|
||||
onItemSelected: (Long) -> Unit,
|
||||
) {
|
||||
|
Loading…
Reference in New Issue
Block a user