Remember group message toggle state

This commit is contained in:
Moez Bhatti
2020-02-29 15:19:05 -05:00
parent 5939e4540c
commit 0ba3ab5839
2 changed files with 6 additions and 1 deletions
@@ -188,6 +188,10 @@ class ComposeViewModel @Inject constructor(
.distinctUntilChanged()
.subscribe { title -> newState { copy(conversationtitle = title) } }
disposables += prefs.sendAsGroup.asObservable()
.distinctUntilChanged()
.subscribe { enabled -> newState { copy(sendAsGroup = enabled) } }
disposables += attachments
.subscribe { attachments -> newState { copy(attachments = attachments) } }
@@ -389,7 +393,7 @@ class ComposeViewModel @Inject constructor(
// Toggle the group sending mode
view.sendAsGroupIntent
.autoDisposable(view.scope())
.subscribe { newState { copy(sendAsGroup = !sendAsGroup) } }
.subscribe { prefs.sendAsGroup.set(!prefs.sendAsGroup.get()) }
// Scroll to search position
searchSelection