Fix per-category sort/display affecting the wrong category

This commit is contained in:
arkon
2023-02-23 13:54:08 -05:00
parent 9432d2d06a
commit bd47eafeec
6 changed files with 37 additions and 42 deletions

View File

@@ -6,10 +6,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import eu.kanade.domain.library.service.LibraryPreferences
@@ -35,13 +32,8 @@ import tachiyomi.domain.manga.model.TriStateFilter
fun LibrarySettingsDialog(
onDismissRequest: () -> Unit,
screenModel: LibrarySettingsScreenModel,
activeCategoryIndex: Int,
category: Category,
) {
val state by screenModel.state.collectAsState()
val category by remember(activeCategoryIndex) {
derivedStateOf { state.categories[activeCategoryIndex] }
}
TabbedDialog(
onDismissRequest = onDismissRequest,
tabTitles = listOf(