From fc0f6b817a80f226d27180b61a33fac69367e52e Mon Sep 17 00:00:00 2001 From: brianabdl Date: Mon, 14 Oct 2024 09:30:58 +0700 Subject: [PATCH] Delete weird animation when changing present theme --- .../appearance/AppearanceSettingScreen.kt | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/presentation/src/commonMain/kotlin/ireader/presentation/ui/settings/appearance/AppearanceSettingScreen.kt b/presentation/src/commonMain/kotlin/ireader/presentation/ui/settings/appearance/AppearanceSettingScreen.kt index 59ba21c1a..94b487f4a 100644 --- a/presentation/src/commonMain/kotlin/ireader/presentation/ui/settings/appearance/AppearanceSettingScreen.kt +++ b/presentation/src/commonMain/kotlin/ireader/presentation/ui/settings/appearance/AppearanceSettingScreen.kt @@ -108,19 +108,11 @@ fun AppearanceSettingScreen( ThemeItem( theme, onClick = { theme -> - scope.launch { - vm.colorTheme.value = theme.id - repeat(3) { _ -> - customizedColors.primaryState.value = theme.materialColors.primary - customizedColors.secondaryState.value = - theme.materialColors.secondary - customizedColors.barsState.value = theme.extraColors.bars - delay(1000) - } - - - vm.isSavable = false - } + vm.colorTheme.value = theme.id + customizedColors.primaryState.value = theme.materialColors.primary + customizedColors.secondaryState.value = theme.materialColors.secondary + customizedColors.barsState.value = theme.extraColors.bars + vm.isSavable = false }, isSelected = vm.colorTheme.value == theme.id, )