mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-01 11:07:34 +01:00
tweak event reminder types a bit
This commit is contained in:
parent
c4dc005a6c
commit
cddbf573e8
@ -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
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user