mirror of
https://github.com/mueller-ma/PrepaidBalance.git
synced 2024-09-20 00:12:15 +02:00
Bump preference-ktx from 1.1.1 to 1.2.0 (#63)
Bumps preference-ktx from 1.1.1 to 1.2.0. --- updated-dependencies: - dependency-name: androidx.preference:preference-ktx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: mueller-ma <mueller-ma@users.noreply.github.com>
This commit is contained in:
parent
92c68de26f
commit
e52954b99e
@ -58,7 +58,7 @@ dependencies {
|
|||||||
implementation "androidx.core:core-ktx:1.7.0"
|
implementation "androidx.core:core-ktx:1.7.0"
|
||||||
implementation "androidx.fragment:fragment-ktx:1.4.1"
|
implementation "androidx.fragment:fragment-ktx:1.4.1"
|
||||||
implementation "androidx.appcompat:appcompat:1.4.1"
|
implementation "androidx.appcompat:appcompat:1.4.1"
|
||||||
implementation "androidx.preference:preference-ktx:1.1.1"
|
implementation "androidx.preference:preference-ktx:1.2.0"
|
||||||
implementation "androidx.constraintlayout:constraintlayout:2.1.3"
|
implementation "androidx.constraintlayout:constraintlayout:2.1.3"
|
||||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
||||||
implementation "com.google.android.material:material:1.5.0"
|
implementation "com.google.android.material:material:1.5.0"
|
||||||
|
@ -70,7 +70,7 @@ class PreferenceActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
val ussdCodePreference = getPreference("ussd_code")
|
val ussdCodePreference = getPreference("ussd_code")
|
||||||
ussdCodePreference.setSummaryProvider { pref ->
|
ussdCodePreference.setSummaryProvider { pref ->
|
||||||
val currentValue = pref.sharedPreferences.getString(pref.key, "").orEmpty()
|
val currentValue = pref.sharedPreferences!!.getString(pref.key, "").orEmpty()
|
||||||
if (!currentValue.isValidUssdCode()) {
|
if (!currentValue.isValidUssdCode()) {
|
||||||
getString(R.string.invalid_ussd_code)
|
getString(R.string.invalid_ussd_code)
|
||||||
} else {
|
} else {
|
||||||
@ -141,9 +141,7 @@ fun PreferenceFragmentCompat.getPreference(key: String) =
|
|||||||
preferenceManager.findPreference<Preference>(key)!!
|
preferenceManager.findPreference<Preference>(key)!!
|
||||||
|
|
||||||
class CopyToClipboardClickHandler : Preference.OnPreferenceClickListener {
|
class CopyToClipboardClickHandler : Preference.OnPreferenceClickListener {
|
||||||
override fun onPreferenceClick(preference: Preference?): Boolean {
|
override fun onPreferenceClick(preference: Preference): Boolean {
|
||||||
preference ?: return true
|
|
||||||
|
|
||||||
val context = preference.context
|
val context = preference.context
|
||||||
val value = context.prefs().getString(preference.key, "")
|
val value = context.prefs().getString(preference.key, "")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user