Save minimum rating search option in preference (#1163)
This commit is contained in:
1 parent
7c39b95025
commit
6298e501cd
2 files changed
+8
-2
No files matched your search
@@ -2,6 +2,8 @@ package com.hippo.ehviewer.ui.main
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.Transient
|
||||
|
||||
object AdvanceTable {
|
||||
const val SH = 0x1
|
||||
@@ -12,7 +14,9 @@ object AdvanceTable {
|
||||
}
|
||||
|
||||
@Parcelize
|
||||
@Serializable
|
||||
data class AdvancedSearchOption(
|
||||
@Transient
|
||||
val advanceSearch: Int = 0,
|
||||
val minRating: Int = 0,
|
||||
val fromPage: Int = 0,
|
||||
|
||||
@@ -177,7 +177,7 @@ fun GalleryListScreen(lub: ListUrlBuilder, navigator: DestinationsNavigator) = c
|
||||
|
||||
var category by rememberMutableStateInDataStore("SearchCategory") { EhUtils.ALL_CATEGORY }
|
||||
var searchMethod by rememberSaveable { mutableIntStateOf(1) }
|
||||
var advancedSearchOption by rememberSaveable { mutableStateOf(AdvancedSearchOption()) }
|
||||
var advancedSearchOption by rememberMutableStateInDataStore("AdvancedSearchOption") { AdvancedSearchOption() }
|
||||
var imageUri by rememberSaveable { mutableStateOf<Uri?>(null) }
|
||||
|
||||
LaunchedEffect(urlBuilder) {
|
||||
@@ -574,7 +574,9 @@ fun GalleryListScreen(lub: ListUrlBuilder, navigator: DestinationsNavigator) = c
|
||||
category = category,
|
||||
onCategoryChanged = { category = it },
|
||||
advancedOption = advancedSearchOption,
|
||||
onAdvancedOptionChanged = { advancedSearchOption = it },
|
||||
onAdvancedOptionChanged = {
|
||||
advancedSearchOption = it
|
||||
},
|
||||
)
|
||||
},
|
||||
floatingActionButton = {
|
||||
|
||||
Reference in new issue
Block a user