Fix: Fixed the appIconsSwitchCompat working with the appIconDotsSwitchCompat

Signed-off-by: HeCodes2Much <wayne6324@gmail.com>
This commit is contained in:
HeCodes2Much
2024-09-05 19:26:12 +01:00
parent ebf7f8c55b
commit 4e61376e41
2 changed files with 7 additions and 1 deletions

View File

@@ -88,7 +88,7 @@ class PreferenceHelper @Inject constructor(@ApplicationContext context: Context)
set(value) = prefs.edit().putBoolean(Constants.SHOW_APP_ICON, value).apply() set(value) = prefs.edit().putBoolean(Constants.SHOW_APP_ICON, value).apply()
var showAppIconAsDots: Boolean var showAppIconAsDots: Boolean
get() = prefs.getBoolean(Constants.SHOW_APP_ICON_DOTS, true) get() = prefs.getBoolean(Constants.SHOW_APP_ICON_DOTS, false)
set(value) = prefs.edit().putBoolean(Constants.SHOW_APP_ICON_DOTS, value).apply() set(value) = prefs.edit().putBoolean(Constants.SHOW_APP_ICON_DOTS, value).apply()
var locationDenied: Boolean var locationDenied: Boolean

View File

@@ -141,6 +141,12 @@ class SettingsFragment : Fragment(),
binding.automaticKeyboardSwitchCompat.isChecked = preferenceHelper.automaticKeyboard binding.automaticKeyboardSwitchCompat.isChecked = preferenceHelper.automaticKeyboard
binding.automaticOpenAppSwitchCompat.isChecked = preferenceHelper.automaticOpenApp binding.automaticOpenAppSwitchCompat.isChecked = preferenceHelper.automaticOpenApp
binding.lockSettingsSwitchCompat.isChecked = preferenceHelper.settingsLock binding.lockSettingsSwitchCompat.isChecked = preferenceHelper.settingsLock
if (!binding.appIconsSwitchCompat.isChecked) {
// Disable and gray out the other setting if appIconsSwitchCompat is checked
binding.appIconDotsSwitchCompat.isEnabled = binding.appIconsSwitchCompat.isChecked
binding.appIconDotsSwitchCompat.isChecked = false
}
} }
private fun observeClickListener() { private fun observeClickListener() {