aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-12-31 02:44:46 -0500
committerGitHub <noreply@github.com>2017-12-31 02:44:46 -0500
commit725d6a99a07f91f940a07e6b49dd6224a6aa32d1 (patch)
tree4e0b1b3b9ffe9b5aef3c8d0f154ea9ab1058fd5e /app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
parent3076d9a97c203497aec1415d8ac6037d10eebb46 (diff)
downloadfrost-725d6a99a07f91f940a07e6b49dd6224a6aa32d1.tar.gz
frost-725d6a99a07f91f940a07e6b49dd6224a6aa32d1.tar.bz2
frost-725d6a99a07f91f940a07e6b49dd6224a6aa32d1.zip
Enhancement/proguard (#589)
* Add error log * Rewrite logger
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.kt8
1 files changed, 4 insertions, 4 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 2d9e0803..5e08b363 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
@@ -152,10 +152,10 @@ enum class NotificationType(
val userId = data.id
val prevNotifTime = lastNotificationTime(userId)
val prevLatestEpoch = getTime(prevNotifTime)
- L.v("Notif $name prev epoch $prevLatestEpoch")
+ L.v { "Notif $name prev epoch $prevLatestEpoch" }
var newLatestEpoch = prevLatestEpoch
notifs.forEach { notif ->
- L.v("Notif timestamp ${notif.timestamp}")
+ L.v { "Notif timestamp ${notif.timestamp}" }
if (notif.timestamp <= prevLatestEpoch) return@forEach
createNotification(context, notif, notifCount == 0)
if (notif.timestamp > newLatestEpoch)
@@ -164,7 +164,7 @@ enum class NotificationType(
}
if (newLatestEpoch > prevLatestEpoch)
putTime(prevNotifTime, newLatestEpoch).save()
- L.d("Notif $name new epoch ${getTime(lastNotificationTime(userId))}")
+ L.d { "Notif $name new epoch ${getTime(lastNotificationTime(userId))}" }
summaryNotification(context, userId, notifCount)
}
@@ -195,7 +195,7 @@ enum class NotificationType(
notifBuilder.withDefaults(ringtone())
if (timestamp != -1L) notifBuilder.setWhen(timestamp * 1000)
- L.v("Notif load", context.toString())
+ L.v { "Notif load $content" }
NotificationManagerCompat.from(context).notify(group, notifId, notifBuilder.build())
if (profileUrl != null) {