Refine naming

This commit is contained in:
GG Bond authored and renovate[bot] committed 2024-05-10 19:27:45 +08:00
1 parent d628024637
commit d0c5ef8e8a
3 files changed
+4 -4

No files matched your search

@@ -128,8 +128,8 @@ import com.hippo.ehviewer.ui.tools.animateFloatMergePredictiveBackAsState
import com.hippo.ehviewer.ui.tools.delegateSnapshotUpdate
import com.hippo.ehviewer.ui.tools.foldToLoadResult
import com.hippo.ehviewer.ui.tools.rememberHapticFeedback
import com.hippo.ehviewer.ui.tools.rememberInDataStore
import com.hippo.ehviewer.ui.tools.rememberInVM
import com.hippo.ehviewer.ui.tools.rememberMutableStateInDataStore
import com.hippo.ehviewer.ui.tools.snackBarPadding
import com.hippo.ehviewer.util.FavouriteStatusRouter
import com.hippo.ehviewer.util.pickVisualMedia
@@ -175,7 +175,7 @@ fun GalleryListScreen(lub: ListUrlBuilder, navigator: DestinationsNavigator) = c
var searchBarOffsetY by remember { mutableIntStateOf(0) }
var showSearchLayout by rememberSaveable { mutableStateOf(false) }
var category by rememberInDataStore("SearchCategory") { EhUtils.ALL_CATEGORY }
var category by rememberMutableStateInDataStore("SearchCategory") { EhUtils.ALL_CATEGORY }
var searchMethod by rememberSaveable { mutableIntStateOf(1) }
var advancedSearchOption by rememberSaveable { mutableStateOf(AdvancedSearchOption()) }
var imageUri by rememberSaveable { mutableStateOf<Uri?>(null) }
@@ -35,7 +35,7 @@ fun CircularLayout(
content: @Composable () -> Unit,
) {
val coroutineScope = rememberCoroutineScope()
var delta by rememberInDataStore("FavDialogTheta") { 0F }
var delta by rememberMutableStateInDataStore("FavDialogTheta") { 0F }
val state = rememberDraggable2DState {
val prevOfs = currentOfs
val prevTheta = currentTheta
@@ -59,7 +59,7 @@ inline fun <reified T : Any> rememberInVM(
// Find out how make this work with any generic `Serializable` type
@Composable
inline fun <reified T> rememberInDataStore(
inline fun <reified T> rememberMutableStateInDataStore(
key: String,
crossinline defaultValue: @DisallowComposableCalls () -> T,
) = with(dataStateFlow) {