From 124d61577dbd1a991f8f50aa5e428b705ab0e363 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Sat, 28 Nov 2020 17:26:03 +0100 Subject: [PATCH] about dialog cleanup and dkma --- .../main/java/info/nightscout/androidaps/MainActivity.kt | 8 +++++--- app/src/main/res/values/strings.xml | 3 ++- build.gradle | 1 + core/build.gradle | 5 +++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt index 809914053a..e62cd087d9 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt @@ -27,6 +27,7 @@ import androidx.viewpager2.widget.ViewPager2 import com.google.android.material.tabs.TabLayoutMediator import com.joanzapata.iconify.Iconify import com.joanzapata.iconify.fonts.FontAwesomeModule +import dev.doubledot.doki.ui.DokiActivity import info.nightscout.androidaps.activities.ProfileHelperActivity import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.activities.PreferencesActivity @@ -304,9 +305,10 @@ class MainActivity : NoSplashAppCompatActivity() { .setIcon(iconsProvider.getIcon()) .setMessage(messageSpanned) .setPositiveButton(resourceHelper.gs(R.string.ok), null) - .create().also { - it.show() - (it.findViewById(android.R.id.message) as TextView).movementMethod = LinkMovementMethod.getInstance() + .setNeutralButton(resourceHelper.gs(R.string.cta_dont_kill_my_app_info)) { _, _ -> DokiActivity.start(context = this@MainActivity) } + .create().apply { + show() + findViewById(android.R.id.message)?.movementMethod = LinkMovementMethod.getInstance() } return true } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6c345adbe3..04f529de4a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -851,7 +851,7 @@ Basal rate changed on pump, but reading it failed Checking for history changes Multiple boluses with the same amount within the same minute were just imported. Only one record could be added to treatments. Please check the pump and manually add a bolus record using the Careportal tab. Make sure to create a bolus with a time no other bolus uses. - \n\nhttp://www.androidaps.org\nhttp://www.androidaps.de (de)\n\nfacebook:\nhttp://facebook.androidaps.org\nhttp://facebook.androidaps.de (de) + \n\ndocumentation:\nhttps://androidaps.readthedocs.io\n\nfacebook:\nhttps://www.facebook.com/groups/AndroidAPSUsers The last bolus is older than 24 hours or is in the future. Please check the date on the pump is set correctly. Time/date of the delivered bolus on pump seems wrong, IOB is likely incorrect. Please check pump time/date. ProfileSwitch missing. Please do a profile switch or press \"Activate Profile\" in the LocalProfile. @@ -1466,5 +1466,6 @@ The following data will be uploaded to your Open Humans account: Glucose values, boluses, carbs, careportal events (except notes), extended boluses, profile switches, total daily doses, temporary basals, temp targets, preferences, application version, device model and screen dimensions. Secret or private information such as your Nightscout URL or API secret will not be uploaded. RileyLink status: Filter + Don\'t kill my app? diff --git a/build.gradle b/build.gradle index 481c61c128..a0e146a95d 100644 --- a/build.gradle +++ b/build.gradle @@ -54,6 +54,7 @@ allprojects { artifact '/[organisation]/[module]/archive/[revision].[ext]' } } + maven { url 'https://jitpack.io' } } //Support @JvmDefault tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { diff --git a/core/build.gradle b/core/build.gradle index 6bde574fca..3fa4d8e8e7 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -84,6 +84,11 @@ dependencies { // pumpCommon implementation "com.google.code.gson:gson:2.8.6" + // don't kill my app + api('dev.doubledot.doki:library:0.0.1@aar') { + transitive = true + } + testImplementation "junit:junit:$junit_version" androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'