aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-06-13 17:19:25 -0700
committerAllan Wang <me@allanwang.ca>2019-06-13 17:19:25 -0700
commit7ad2a898571db9c0db95caf09cda8632660ff6dd (patch)
treeb956e8354030f9be7bbf48fcb8ea8c7acc685481 /app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
parent682227c17b46ff7957f9399b7f610d52f06c1428 (diff)
downloadfrost-7ad2a898571db9c0db95caf09cda8632660ff6dd.tar.gz
frost-7ad2a898571db9c0db95caf09cda8632660ff6dd.tar.bz2
frost-7ad2a898571db9c0db95caf09cda8632660ff6dd.zip
Resolve file uri ourself for ringtones, resolves #1423
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.kt6
1 files changed, 3 insertions, 3 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 4b0e1a82..0b1deb4e 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
@@ -170,7 +170,7 @@ enum class NotificationType(
val ringtone = ringtone()
notifs.forEachIndexed { i, notif ->
// Ring at most twice
- notif.withAlert(i < 2, ringtone).notify(context)
+ notif.withAlert(context, i < 2, ringtone).notify(context)
}
return notifs.size
}
@@ -302,8 +302,8 @@ data class FrostNotification(
val notif: NotificationCompat.Builder
) {
- fun withAlert(enable: Boolean, ringtone: String): FrostNotification {
- notif.setFrostAlert(enable, ringtone)
+ fun withAlert(context: Context, enable: Boolean, ringtone: String): FrostNotification {
+ notif.setFrostAlert(context, enable, ringtone)
return this
}