chore: remove log.
This commit is contained in:
parent
47f78754dc
commit
b7f3a9877a
@ -105,7 +105,9 @@ class SettingsActivity :
|
||||
|
||||
preferenceManager.findPreference<Preference>("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<EditTextPreference>("prefer_api_items_number")
|
||||
val editTextPreference =
|
||||
preferenceManager.findPreference<EditTextPreference>("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<Preference>("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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user