From 43aefeedae9e73eee636ec346b902f96379be020 Mon Sep 17 00:00:00 2001 From: GG Bond Date: Thu, 7 Mar 2024 21:50:30 +0800 Subject: [PATCH] Restore dep behaviour of fullscreen & cutoutShort --- .../ehviewer/ui/reader/ReaderGeneralSetting.kt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/hippo/ehviewer/ui/reader/ReaderGeneralSetting.kt b/app/src/main/kotlin/com/hippo/ehviewer/ui/reader/ReaderGeneralSetting.kt index 5e54b7e65..6426d9c9d 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/ui/reader/ReaderGeneralSetting.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/ui/reader/ReaderGeneralSetting.kt @@ -30,14 +30,17 @@ fun ReaderGeneralSetting() = Column { title = stringResource(id = R.string.pref_double_tap_to_zoom), field = Settings.doubleTapToZoom.asMutableState(), ) + val fullscreen = Settings.fullscreen.asMutableState() SwitchChoice( title = stringResource(id = R.string.pref_fullscreen), - field = Settings.fullscreen.asMutableState(), - ) - SwitchChoice( - title = stringResource(id = R.string.pref_cutout_short), - field = Settings.cutoutShort.asMutableState(), + field = fullscreen, ) + AnimatedVisibility(visible = fullscreen.value) { + SwitchChoice( + title = stringResource(id = R.string.pref_cutout_short), + field = Settings.cutoutShort.asMutableState(), + ) + } SwitchChoice( title = stringResource(id = R.string.pref_keep_screen_on), field = Settings.keepScreenOn.asMutableState(),