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 }