aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/settings/Notifications.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-10-07 01:00:24 -0400
committerGitHub <noreply@github.com>2017-10-07 01:00:24 -0400
commit60cc50d8f6785d33adf4dafd456c836c96a9e3de (patch)
treea887c1dc931f0c434e912c9209c8fa91c2d003e9 /app/src/main/kotlin/com/pitchedapps/frost/settings/Notifications.kt
parent5382d8222915727a47c36f0e7ac280c701dbfcdf (diff)
downloadfrost-60cc50d8f6785d33adf4dafd456c836c96a9e3de.tar.gz
frost-60cc50d8f6785d33adf4dafd456c836c96a9e3de.tar.bz2
frost-60cc50d8f6785d33adf4dafd456c836c96a9e3de.zip
Enhancement/message parsing (#369)
* Test custom regex * Remove statics, use lists, and add amp (#366) * Remove statics, use lists, and add amp * Remove another jvmstatic * Update parser for messages * Update dependencies * Update travis * Use parsing for background im fetcher * Update changelog * Update changelog
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/settings/Notifications.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Notifications.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Notifications.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Notifications.kt
index 0f2f8638..f46517ac 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Notifications.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Notifications.kt
@@ -58,10 +58,15 @@ fun SettingsActivity.getNotificationPrefs(): KPrefAdapterBuilder.() -> Unit = {
descRes = R.string.notification_all_accounts_desc
}
- checkbox(R.string.notification_messages, { Prefs.notificationsInstantMessages }, { Prefs.notificationsInstantMessages = it }) {
+ checkbox(R.string.notification_messages, { Prefs.notificationsInstantMessages }, { Prefs.notificationsInstantMessages = it; reloadByTitle(R.string.notification_messages_all_accounts) }) {
descRes = R.string.notification_messages_desc
}
+ checkbox(R.string.notification_messages_all_accounts, { Prefs.notificationsImAllAccounts }, { Prefs.notificationsImAllAccounts = it }) {
+ descRes = R.string.notification_messages_all_accounts_desc
+ enabler = { Prefs.notificationsInstantMessages }
+ }
+
checkbox(R.string.notification_sound, { Prefs.notificationSound }, { Prefs.notificationSound = it; reloadByTitle(R.string.notification_ringtone, R.string.message_ringtone) })
fun KPrefText.KPrefTextContract<String>.ringtone(code: Int) {