From 741e24c984e7741adb5f999a9f0ab6661f9b9c4d Mon Sep 17 00:00:00 2001 From: Rocket Aaron Date: Wed, 6 Nov 2024 22:51:25 +0800 Subject: [PATCH] Fix invalid device name condition --- src/org/kde/kdeconnect/UserInterface/SettingsFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/kde/kdeconnect/UserInterface/SettingsFragment.kt b/src/org/kde/kdeconnect/UserInterface/SettingsFragment.kt index 49edbb3f..5674aabb 100644 --- a/src/org/kde/kdeconnect/UserInterface/SettingsFragment.kt +++ b/src/org/kde/kdeconnect/UserInterface/SettingsFragment.kt @@ -80,7 +80,7 @@ class SettingsFragment : PreferenceFragmentCompat() { setNegativeButtonText(R.string.cancel) onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _: Preference?, new: Any? -> val name = new as String? - if (!name.isNullOrBlank()) { + if (name.isNullOrBlank()) { if (view != null) { val snackbar = Snackbar.make(requireView(), R.string.invalid_device_name, Snackbar.LENGTH_LONG) val currentTheme = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK