mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 20:31:02 -05:00
SourcePreferencesController: Also call onBindEditText listener set by extension (#6310)
This commit is contained in:
parent
a9d2741e6a
commit
e51a6d332e
2 changed files with 11 additions and 0 deletions
|
@ -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.PreferenceManager
|
||||
import androidx.preference.PreferenceScreen
|
||||
import androidx.preference.getOnBindEditTextListener
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.preference.SharedPreferencesDataStore
|
||||
|
@ -117,7 +118,9 @@ class SourcePreferencesController(bundle: Bundle? = null) :
|
|||
|
||||
// Apply incognito IME for EditTextPreference
|
||||
if (pref is EditTextPreference) {
|
||||
val setListener = pref.getOnBindEditTextListener()
|
||||
pref.setOnBindEditTextListener {
|
||||
setListener?.onBindEditText(it)
|
||||
it.setIncognito(viewScope)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue