0
0
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:
dependabot[bot] 2022-01-27 07:50:00 +01:00 committed by GitHub
parent 92c68de26f
commit e52954b99e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -58,7 +58,7 @@ dependencies {
implementation "androidx.core:core-ktx:1.7.0"
implementation "androidx.fragment:fragment-ktx: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.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation "com.google.android.material:material:1.5.0"

View File

@ -70,7 +70,7 @@ class PreferenceActivity : AppCompatActivity() {
val ussdCodePreference = getPreference("ussd_code")
ussdCodePreference.setSummaryProvider { pref ->
val currentValue = pref.sharedPreferences.getString(pref.key, "").orEmpty()
val currentValue = pref.sharedPreferences!!.getString(pref.key, "").orEmpty()
if (!currentValue.isValidUssdCode()) {
getString(R.string.invalid_ussd_code)
} else {
@ -141,9 +141,7 @@ fun PreferenceFragmentCompat.getPreference(key: String) =
preferenceManager.findPreference<Preference>(key)!!
class CopyToClipboardClickHandler : Preference.OnPreferenceClickListener {
override fun onPreferenceClick(preference: Preference?): Boolean {
preference ?: return true
override fun onPreferenceClick(preference: Preference): Boolean {
val context = preference.context
val value = context.prefs().getString(preference.key, "")