tweak event reminder types a bit

This commit is contained in:
tibbi 2017-01-07 11:01:00 +01:00
parent c4dc005a6c
commit cddbf573e8
12 changed files with 15 additions and 5 deletions

View File

@ -68,7 +68,7 @@ private fun getNewTS(ts: Int, isMonthly: Boolean): Int {
}
fun Context.scheduleNotification(event: Event) {
if (event.reminderMinutes == -1)
if (event.reminderMinutes == REMINDER_OFF)
return
scheduleNextEvent(event)
@ -76,7 +76,7 @@ fun Context.scheduleNotification(event: Event) {
fun Context.scheduleEventIn(notifTS: Int, event: Event) {
val delayFromNow = notifTS.toLong() * 1000 - System.currentTimeMillis()
if (delayFromNow < 0)
if (delayFromNow <= 0)
return
val notifInMs = SystemClock.elapsedRealtime() + delayFromNow

View File

@ -13,9 +13,9 @@ val MONTHLY_VIEW = 1
val YEARLY_VIEW = 2
val EVENTS_LIST_VIEW = 3
val REMINDER_OFF = 0
val REMINDER_AT_START = 1
val REMINDER_CUSTOM = 2
val REMINDER_OFF = -1
val REMINDER_AT_START = 0
val REMINDER_CUSTOM = 1
val DAY = 86400
val WEEK = 604800

View File

@ -98,6 +98,7 @@
<!-- Release notes -->
<string name="release_4x">Added a weekly view</string>
<string name="release_46">Event reminder types have been tweaked, please update them</string>
<string name="release_44">
Added more color customization options\n
Your settings have been cleared, please reset them</string>

View File

@ -98,6 +98,7 @@
<!-- Release notes -->
<string name="release_4x">Added a weekly view</string>
<string name="release_46">Event reminder types have been tweaked, please update them</string>
<string name="release_44">
Added more color customization options\n
Your settings have been cleared, please reset them</string>

View File

@ -98,6 +98,7 @@
<!-- Release notes -->
<string name="release_4x">Added a weekly view</string>
<string name="release_46">Event reminder types have been tweaked, please update them</string>
<string name="release_44">
Plus d\'options de personnalisation des couleurs ajoutées\n
Vos paramètres ont été nettoyés, veuillez les réinitialiser</string>

View File

@ -98,6 +98,7 @@
<!-- Release notes -->
<string name="release_4x">Added a weekly view</string>
<string name="release_46">Event reminder types have been tweaked, please update them</string>
<string name="release_44">
Added more color customization options\n
Your settings have been cleared, please reset them</string>

View File

@ -98,6 +98,7 @@
<!-- Release notes -->
<string name="release_4x">Added a weekly view</string>
<string name="release_46">Event reminder types have been tweaked, please update them</string>
<string name="release_44">
Added more color customization options\n
Your settings have been cleared, please reset them</string>

View File

@ -98,6 +98,7 @@
<!-- Release notes -->
<string name="release_4x">Added a weekly view</string>
<string name="release_46">Event reminder types have been tweaked, please update them</string>
<string name="release_44">
Added more color customization options\n
Your settings have been cleared, please reset them</string>

View File

@ -98,6 +98,7 @@
<!-- Release notes -->
<string name="release_4x">Added a weekly view</string>
<string name="release_46">Event reminder types have been tweaked, please update them</string>
<string name="release_44">
Added more color customization options\n
Your settings have been cleared, please reset them</string>

View File

@ -98,6 +98,7 @@
<!-- Release notes -->
<string name="release_4x">Added a weekly view</string>
<string name="release_46">Event reminder types have been tweaked, please update them</string>
<string name="release_44">
Added more color customization options\n
Your settings have been cleared, please reset them</string>

View File

@ -98,6 +98,7 @@
<!-- Release notes -->
<string name="release_4x">Added a weekly view</string>
<string name="release_46">Event reminder types have been tweaked, please update them</string>
<string name="release_44">
Added more color customization options\n
Your settings have been cleared, please reset them</string>

View File

@ -98,6 +98,7 @@
<!-- Release notes -->
<string name="release_4x">Added a weekly view</string>
<string name="release_46">Event reminder types have been tweaked, please update them</string>
<string name="release_44">
Added more color customization options\n
Your settings have been cleared, please reset them</string>