From bf674a51519f7662f2fb21f079796344f4effd22 Mon Sep 17 00:00:00 2001 From: Super12138 <70494801+Super12138@users.noreply.github.com> Date: Thu, 15 Aug 2024 11:22:39 +0800 Subject: [PATCH] Fixed haptic feedback issue for some setting item. --- .../cn/super12138/todo/views/settings/SettingsFragment.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/cn/super12138/todo/views/settings/SettingsFragment.kt b/app/src/main/kotlin/cn/super12138/todo/views/settings/SettingsFragment.kt index 2a91211..0801717 100644 --- a/app/src/main/kotlin/cn/super12138/todo/views/settings/SettingsFragment.kt +++ b/app/src/main/kotlin/cn/super12138/todo/views/settings/SettingsFragment.kt @@ -78,10 +78,8 @@ class SettingsFragment : PreferenceFragmentCompat() { } findPreference(Constants.PREF_HAPTIC_FEEDBACK)?.apply { - setOnPreferenceChangeListener { _, newValue -> - if (newValue as Boolean) { - VibrationUtils.performHapticFeedback(view) - } + setOnPreferenceChangeListener { _, _ -> + VibrationUtils.performHapticFeedback(view) true }