Merge pull request #1773 from MilosKozak/AdrianLxM-patch-1
Don't warn if next loop invocation is prior to update check
This commit is contained in:
commit
c0cbaafe09
1 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue