From b7f3a9877a3da8e148cee53cc21206372a23dd8c Mon Sep 17 00:00:00 2001 From: Amine Date: Mon, 30 Dec 2024 12:58:34 +0100 Subject: [PATCH] chore: remove log. --- .../android/settings/SettingsActivity.kt | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/settings/SettingsActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/settings/SettingsActivity.kt index 4f11ab0..c6034a1 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/settings/SettingsActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/settings/SettingsActivity.kt @@ -105,7 +105,9 @@ class SettingsActivity : preferenceManager.findPreference("currentMode")?.onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _, newValue -> - AppCompatDelegate.setDefaultNightMode(newValue.toString().toInt()) // ListPreference Only takes string-arrays ¯\_(ツ)_/¯ + AppCompatDelegate.setDefaultNightMode( + newValue.toString().toInt() + ) // ListPreference Only takes string-arrays ¯\_(ツ)_/¯ true } @@ -129,7 +131,8 @@ class SettingsActivity : ) { setPreferencesFromResource(R.xml.pref_general, rootKey) - val editTextPreference = preferenceManager.findPreference("prefer_api_items_number") + val editTextPreference = + preferenceManager.findPreference("prefer_api_items_number") editTextPreference?.setOnBindEditTextListener { editText -> editText.inputType = InputType.TYPE_CLASS_NUMBER editText.filters = @@ -139,8 +142,11 @@ class SettingsActivity : val input: Int = (dest.toString() + source.toString()).toInt() if (input in 1..200) return@InputFilter null } catch (nfe: NumberFormatException) { - nfe.sendSilentlyWithAcraWithName("GeneralPreferenceFragment") - Toast.makeText(activity, R.string.items_number_should_be_number, Toast.LENGTH_LONG).show() + Toast.makeText( + activity, + R.string.items_number_should_be_number, + Toast.LENGTH_LONG + ).show() } "" }, @@ -222,7 +228,9 @@ class SettingsActivity : preferenceManager.findPreference("currentMode")?.onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _, newValue -> - AppCompatDelegate.setDefaultNightMode(newValue.toString().toInt()) // ListPreference Only takes string-arrays ¯\_(ツ)_/¯ + AppCompatDelegate.setDefaultNightMode( + newValue.toString().toInt() + ) // ListPreference Only takes string-arrays ¯\_(ツ)_/¯ true } } @@ -268,4 +276,4 @@ class SettingsActivity : setPreferencesFromResource(R.xml.pref_experimental, rootKey) } } -} +} \ No newline at end of file