Allow per-contact notification settings for pre-oreo

This commit is contained in:
Moez Bhatti
2018-02-27 21:38:44 -05:00
parent 59a40c5372
commit 30f6dac784
6 changed files with 52 additions and 26 deletions
@@ -30,7 +30,6 @@ data class SettingsState(
val nightEnd: String = "",
val autoEmojiEnabled: Boolean = true,
val notificationsEnabled: Boolean = true,
val vibrationEnabled: Boolean = true,
val deliveryEnabled: Boolean = false,
val splitSmsEnabled: Boolean = false,
val stripUnicodeEnabled: Boolean = false,
@@ -70,12 +70,9 @@ class SettingsViewModel : QkViewModel<SettingsView, SettingsState>(SettingsState
disposables += prefs.autoEmoji.asObservable()
.subscribe { enabled -> newState { it.copy(autoEmojiEnabled = enabled) } }
disposables += prefs.notifications.asObservable()
disposables += prefs.notifications().asObservable()
.subscribe { enabled -> newState { it.copy(notificationsEnabled = enabled) } }
disposables += prefs.vibration.asObservable()
.subscribe { enabled -> newState { it.copy(vibrationEnabled = enabled) } }
disposables += prefs.delivery.asObservable()
.subscribe { enabled -> newState { it.copy(deliveryEnabled = enabled) } }