From 8b18a7ffb341d4d0f1457fe01fdcf9044e9609b9 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 25 Apr 2019 18:59:10 +0200 Subject: [PATCH 1/3] German git --- app/build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 676c9b6287..a8d8f2a0fe 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -87,7 +87,8 @@ def allCommited = { -> } catch (ignored) { return false; // NoGitSystemAvailable } - return stringBuilder.toString().contains("nothing to commit") + return stringBuilder.toString().contains("nothing to commit") || stringBuilder.toString().contains("nichts zu committen") + } tasks.matching { it instanceof Test }.all { From 6fd8d7ae3cbbd2fc57583056f8a9e960eb32db30 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Thu, 25 Apr 2019 20:42:34 +0200 Subject: [PATCH 2/3] not language dependent git command --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a8d8f2a0fe..8c153a9e81 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -79,7 +79,7 @@ def allCommited = { -> try { def stdout = new ByteArrayOutputStream() exec { - commandLine 'git', 'status' + commandLine 'git', 'status', '-s' standardOutput = stdout } String commitObject = stdout.toString().trim() @@ -87,7 +87,7 @@ def allCommited = { -> } catch (ignored) { return false; // NoGitSystemAvailable } - return stringBuilder.toString().contains("nothing to commit") || stringBuilder.toString().contains("nichts zu committen") + return stringBuilder.toString().isEmpty() } From f2c18cbc1ff7ceab3659f3e96fb36d64c0d2c956 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Thu, 25 Apr 2019 22:13:31 +0200 Subject: [PATCH 3/3] Don't warn if next loop invocation is prior to update check --- .../plugins/general/versionChecker/VersionCheckerPlugin.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerPlugin.kt index 2a4c08a585..c0335ea64a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerPlugin.kt @@ -32,6 +32,13 @@ object VersionCheckerPlugin : PluginBase(PluginDescription() private fun checkWarning() { val now = System.currentTimeMillis() + + if (!SP.contains(R.string.key_last_versionchecker_plugin_warning)) { + SP.putLong(R.string.key_last_versionchecker_plugin_warning, now) + return + } + + if (isOldVersion(GRACE_PERIOD_WARNING) && shouldWarnAgain(now)) { // store last notification time SP.putLong(R.string.key_last_versionchecker_plugin_warning, now)