mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
tweak event reminder types a bit
This commit is contained in:
@@ -68,7 +68,7 @@ private fun getNewTS(ts: Int, isMonthly: Boolean): Int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun Context.scheduleNotification(event: Event) {
|
fun Context.scheduleNotification(event: Event) {
|
||||||
if (event.reminderMinutes == -1)
|
if (event.reminderMinutes == REMINDER_OFF)
|
||||||
return
|
return
|
||||||
|
|
||||||
scheduleNextEvent(event)
|
scheduleNextEvent(event)
|
||||||
@@ -76,7 +76,7 @@ fun Context.scheduleNotification(event: Event) {
|
|||||||
|
|
||||||
fun Context.scheduleEventIn(notifTS: Int, event: Event) {
|
fun Context.scheduleEventIn(notifTS: Int, event: Event) {
|
||||||
val delayFromNow = notifTS.toLong() * 1000 - System.currentTimeMillis()
|
val delayFromNow = notifTS.toLong() * 1000 - System.currentTimeMillis()
|
||||||
if (delayFromNow < 0)
|
if (delayFromNow <= 0)
|
||||||
return
|
return
|
||||||
|
|
||||||
val notifInMs = SystemClock.elapsedRealtime() + delayFromNow
|
val notifInMs = SystemClock.elapsedRealtime() + delayFromNow
|
||||||
|
@@ -13,9 +13,9 @@ val MONTHLY_VIEW = 1
|
|||||||
val YEARLY_VIEW = 2
|
val YEARLY_VIEW = 2
|
||||||
val EVENTS_LIST_VIEW = 3
|
val EVENTS_LIST_VIEW = 3
|
||||||
|
|
||||||
val REMINDER_OFF = 0
|
val REMINDER_OFF = -1
|
||||||
val REMINDER_AT_START = 1
|
val REMINDER_AT_START = 0
|
||||||
val REMINDER_CUSTOM = 2
|
val REMINDER_CUSTOM = 1
|
||||||
|
|
||||||
val DAY = 86400
|
val DAY = 86400
|
||||||
val WEEK = 604800
|
val WEEK = 604800
|
||||||
|
@@ -98,6 +98,7 @@
|
|||||||
|
|
||||||
<!-- Release notes -->
|
<!-- Release notes -->
|
||||||
<string name="release_4x">Added a weekly view</string>
|
<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">
|
<string name="release_44">
|
||||||
Added more color customization options\n
|
Added more color customization options\n
|
||||||
Your settings have been cleared, please reset them</string>
|
Your settings have been cleared, please reset them</string>
|
||||||
|
@@ -98,6 +98,7 @@
|
|||||||
|
|
||||||
<!-- Release notes -->
|
<!-- Release notes -->
|
||||||
<string name="release_4x">Added a weekly view</string>
|
<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">
|
<string name="release_44">
|
||||||
Added more color customization options\n
|
Added more color customization options\n
|
||||||
Your settings have been cleared, please reset them</string>
|
Your settings have been cleared, please reset them</string>
|
||||||
|
@@ -98,6 +98,7 @@
|
|||||||
|
|
||||||
<!-- Release notes -->
|
<!-- Release notes -->
|
||||||
<string name="release_4x">Added a weekly view</string>
|
<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">
|
<string name="release_44">
|
||||||
Plus d\'options de personnalisation des couleurs ajoutées\n
|
Plus d\'options de personnalisation des couleurs ajoutées\n
|
||||||
Vos paramètres ont été nettoyés, veuillez les réinitialiser</string>
|
Vos paramètres ont été nettoyés, veuillez les réinitialiser</string>
|
||||||
|
@@ -98,6 +98,7 @@
|
|||||||
|
|
||||||
<!-- Release notes -->
|
<!-- Release notes -->
|
||||||
<string name="release_4x">Added a weekly view</string>
|
<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">
|
<string name="release_44">
|
||||||
Added more color customization options\n
|
Added more color customization options\n
|
||||||
Your settings have been cleared, please reset them</string>
|
Your settings have been cleared, please reset them</string>
|
||||||
|
@@ -98,6 +98,7 @@
|
|||||||
|
|
||||||
<!-- Release notes -->
|
<!-- Release notes -->
|
||||||
<string name="release_4x">Added a weekly view</string>
|
<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">
|
<string name="release_44">
|
||||||
Added more color customization options\n
|
Added more color customization options\n
|
||||||
Your settings have been cleared, please reset them</string>
|
Your settings have been cleared, please reset them</string>
|
||||||
|
@@ -98,6 +98,7 @@
|
|||||||
|
|
||||||
<!-- Release notes -->
|
<!-- Release notes -->
|
||||||
<string name="release_4x">Added a weekly view</string>
|
<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">
|
<string name="release_44">
|
||||||
Added more color customization options\n
|
Added more color customization options\n
|
||||||
Your settings have been cleared, please reset them</string>
|
Your settings have been cleared, please reset them</string>
|
||||||
|
@@ -98,6 +98,7 @@
|
|||||||
|
|
||||||
<!-- Release notes -->
|
<!-- Release notes -->
|
||||||
<string name="release_4x">Added a weekly view</string>
|
<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">
|
<string name="release_44">
|
||||||
Added more color customization options\n
|
Added more color customization options\n
|
||||||
Your settings have been cleared, please reset them</string>
|
Your settings have been cleared, please reset them</string>
|
||||||
|
@@ -98,6 +98,7 @@
|
|||||||
|
|
||||||
<!-- Release notes -->
|
<!-- Release notes -->
|
||||||
<string name="release_4x">Added a weekly view</string>
|
<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">
|
<string name="release_44">
|
||||||
Added more color customization options\n
|
Added more color customization options\n
|
||||||
Your settings have been cleared, please reset them</string>
|
Your settings have been cleared, please reset them</string>
|
||||||
|
@@ -98,6 +98,7 @@
|
|||||||
|
|
||||||
<!-- Release notes -->
|
<!-- Release notes -->
|
||||||
<string name="release_4x">Added a weekly view</string>
|
<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">
|
<string name="release_44">
|
||||||
Added more color customization options\n
|
Added more color customization options\n
|
||||||
Your settings have been cleared, please reset them</string>
|
Your settings have been cleared, please reset them</string>
|
||||||
|
@@ -98,6 +98,7 @@
|
|||||||
|
|
||||||
<!-- Release notes -->
|
<!-- Release notes -->
|
||||||
<string name="release_4x">Added a weekly view</string>
|
<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">
|
<string name="release_44">
|
||||||
Added more color customization options\n
|
Added more color customization options\n
|
||||||
Your settings have been cleared, please reset them</string>
|
Your settings have been cleared, please reset them</string>
|
||||||
|
Reference in New Issue
Block a user