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/NotificationUtils.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/NotificationUtils.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt index 7014cb78..59352f8e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt @@ -24,24 +24,20 @@ import com.pitchedapps.frost.utils.Prefs */ const val NOTIF_CHANNEL_GENERAL = "general" const val NOTIF_CHANNEL_MESSAGES = "messages" -const val NOTIF_CHANNEL_UPDATES = "updates" fun setupNotificationChannels(c: Context) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return val manager = c.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager val appName = c.string(R.string.frost_name) val msg = c.string(R.string.messages) - val updates = c.string(R.string.updates) manager.notificationChannels .filter { it.id != NOTIF_CHANNEL_GENERAL && it.id != NOTIF_CHANNEL_MESSAGES - && it.id != NOTIF_CHANNEL_UPDATES } .forEach { manager.deleteNotificationChannel(it.id) } manager.createNotificationChannel(NOTIF_CHANNEL_GENERAL, appName) manager.createNotificationChannel(NOTIF_CHANNEL_MESSAGES, "$appName: $msg") - manager.createNotificationChannel(NOTIF_CHANNEL_UPDATES, "$appName: $updates") L.d { "Created notification channels: ${manager.notificationChannels.size} channels, ${manager.notificationChannelGroups.size} groups" } } @@ -144,4 +140,4 @@ inline fun <reified T : JobService> Context.fetchJob(id: Int): Boolean { return false } return true -}
\ No newline at end of file +} |