From 8b89d81970e9026b5ae934c262aba0cf373cc7c0 Mon Sep 17 00:00:00 2001 From: Christian Basler Date: Wed, 13 Jun 2018 19:48:00 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=B4=20Minor=20improvements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 +- .../main/java/ch/dissem/apps/abit/SettingsFragment.kt | 9 +++++---- build.gradle | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ce56baa..c05f792 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -101,7 +101,7 @@ dependencies { transitive = true } implementation 'com.github.angads25:filepicker:1.1.1' - implementation 'com.android.support.constraint:constraint-layout:1.1.0' + implementation 'com.android.support.constraint:constraint-layout:1.1.1' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.15.0' diff --git a/app/src/main/java/ch/dissem/apps/abit/SettingsFragment.kt b/app/src/main/java/ch/dissem/apps/abit/SettingsFragment.kt index da61c5d..3845f8f 100644 --- a/app/src/main/java/ch/dissem/apps/abit/SettingsFragment.kt +++ b/app/src/main/java/ch/dissem/apps/abit/SettingsFragment.kt @@ -262,10 +262,11 @@ class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedP } private fun connectivityChangeListener() = - OnPreferenceChangeListener { preference, newValue -> - val ctx = context - if (ctx != null && Build.VERSION.SDK_INT >= LOLLIPOP && Preferences.isFullNodeActive(ctx)) { - NetworkUtils.scheduleNodeStart(ctx) + OnPreferenceChangeListener { _, _ -> + context?.let { ctx -> + if (Build.VERSION.SDK_INT >= LOLLIPOP && Preferences.isFullNodeActive(ctx)) { + NetworkUtils.scheduleNodeStart(ctx) + } } true } diff --git a/build.gradle b/build.gradle index 86e3333..dd57b70 100644 --- a/build.gradle +++ b/build.gradle @@ -19,10 +19,10 @@ allprojects { apply plugin: 'com.github.ben-manes.versions' repositories { + google() jcenter() mavenCentral() maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } maven { url "https://jitpack.io" } - google() } }