fix: Prevent unnecessary theme change calls in ThemeScreen

This commit is contained in:
k1ngsterr1
2026-01-22 15:03:51 +05:00
parent c7443a7ed7
commit 957cdc4c19

View File

@@ -107,8 +107,10 @@ fun ThemeScreen(
title = "Light",
isSelected = themeMode == "light",
onClick = {
if (themeMode != "light") {
themeMode = "light"
onThemeChange(false)
}
},
textColor = textColor,
secondaryTextColor = secondaryTextColor,
@@ -121,8 +123,10 @@ fun ThemeScreen(
title = "Dark",
isSelected = themeMode == "dark",
onClick = {
if (themeMode != "dark") {
themeMode = "dark"
onThemeChange(true)
}
},
textColor = textColor,
secondaryTextColor = secondaryTextColor,