diff options
author | Allan Wang <me@allanwang.ca> | 2018-04-12 18:50:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-12 18:50:58 -0400 |
commit | d9e2562267e549ee407e683262406581f2c4888e (patch) | |
tree | 0dc063913b00a9dc4f10d0d5c7085218c2cc17c3 /app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt | |
parent | 42e57597bcc3216778e9f14389f751eb62da1bd5 (diff) | |
download | frost-d9e2562267e549ee407e683262406581f2c4888e.tar.gz frost-d9e2562267e549ee407e683262406581f2c4888e.tar.bz2 frost-d9e2562267e549ee407e683262406581f2c4888e.zip |
Misc (#865)
* Clean up git code
* Update download link
* Update theme
* Reorder settings, resolvees #856
* Do not log undeliverable exception
* Handle potential lack of webview
* Set notification epoch default to now, resolves #857
* Fix notification epoch time init
* Update changelog
* Update theme
* Add slack url, resolves #880
* Prepare for image update
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt index 0af76b31..bc2e66a5 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt @@ -120,6 +120,8 @@ enum class NotificationType( if (newLatestEpoch > prevLatestEpoch) putTime(prevNotifTime, newLatestEpoch).save() L.d { "Notif $name new epoch ${getTime(lastNotificationTime(userId))}" } + if (prevLatestEpoch == -1L) + return 0 // do not notify the first time frostEvent("Notifications", "Type" to name, "Count" to notifs.size) if (notifs.size > 1) summaryNotification(context, userId, notifs.size).notify(context) |