diff --git a/app/build.gradle b/app/build.gradle index 10a52b8ca1..cef63558b9 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,8 @@ def allCommited = { -> } catch (ignored) { return false; // NoGitSystemAvailable } - return stringBuilder.toString().contains("nothing to commit") + return stringBuilder.toString().isEmpty() + } tasks.matching { it instanceof Test }.all { 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)