mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-22 21:25:46 +03:00
Fix downloaded filter unmatched state in manga screen (#8897)
This commit is contained in:
parent
db4ae134aa
commit
768bb7b503
1 changed files with 5 additions and 11 deletions
|
@ -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 a new issue