mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-17 16:09:16 +01:00
SourcePreferencesController: Also call onBindEditText listener set by extension (#6310)
This commit is contained in:
parent
a9d2741e6a
commit
e51a6d332e
@ -0,0 +1,8 @@
|
|||||||
|
package androidx.preference
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns package-private [EditTextPreference.getOnBindEditTextListener]
|
||||||
|
*/
|
||||||
|
fun EditTextPreference.getOnBindEditTextListener(): EditTextPreference.OnBindEditTextListener? {
|
||||||
|
return onBindEditTextListener
|
||||||
|
}
|
@ -19,6 +19,7 @@ import androidx.preference.Preference
|
|||||||
import androidx.preference.PreferenceGroupAdapter
|
import androidx.preference.PreferenceGroupAdapter
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import androidx.preference.PreferenceScreen
|
import androidx.preference.PreferenceScreen
|
||||||
|
import androidx.preference.getOnBindEditTextListener
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.preference.SharedPreferencesDataStore
|
import eu.kanade.tachiyomi.data.preference.SharedPreferencesDataStore
|
||||||
@ -117,7 +118,9 @@ class SourcePreferencesController(bundle: Bundle? = null) :
|
|||||||
|
|
||||||
// Apply incognito IME for EditTextPreference
|
// Apply incognito IME for EditTextPreference
|
||||||
if (pref is EditTextPreference) {
|
if (pref is EditTextPreference) {
|
||||||
|
val setListener = pref.getOnBindEditTextListener()
|
||||||
pref.setOnBindEditTextListener {
|
pref.setOnBindEditTextListener {
|
||||||
|
setListener?.onBindEditText(it)
|
||||||
it.setIncognito(viewScope)
|
it.setIncognito(viewScope)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user