warn at date

This commit is contained in:
AdrianLxM 2019-04-23 21:40:10 +02:00
parent 249121f80d
commit 0cab8c1d89

View file

@ -37,7 +37,7 @@ object VersionCheckerPlugin : PluginBase(PluginDescription()
SP.putLong(R.string.key_last_versionchecker_plugin_warning, now)
//notify
val message = MainApp.gs(R.string.new_version_warning, Math.round(now / TimeUnit.DAYS.toMillis(1).toDouble()))
val message = MainApp.gs(R.string.new_version_warning, Math.round((now - SP.getLong(R.string.key_last_time_this_version_detected, now)) / TimeUnit.DAYS.toMillis(1).toDouble()))
val notification = Notification(Notification.OLDVERSION, message, Notification.NORMAL)
MainApp.bus().post(EventNewNotification(notification))
}