forked from upstream-mirrors/quik
Remember group message toggle state
This commit is contained in:
@@ -84,6 +84,7 @@ class Preferences @Inject constructor(
|
|||||||
val sia = rxPrefs.getBoolean("sia", false)
|
val sia = rxPrefs.getBoolean("sia", false)
|
||||||
|
|
||||||
// User configurable
|
// User configurable
|
||||||
|
val sendAsGroup = rxPrefs.getBoolean("sendAsGroup", true)
|
||||||
val nightMode = rxPrefs.getInteger("nightMode", when (Build.VERSION.SDK_INT >= 29) {
|
val nightMode = rxPrefs.getInteger("nightMode", when (Build.VERSION.SDK_INT >= 29) {
|
||||||
true -> NIGHT_MODE_SYSTEM
|
true -> NIGHT_MODE_SYSTEM
|
||||||
false -> NIGHT_MODE_OFF
|
false -> NIGHT_MODE_OFF
|
||||||
|
|||||||
@@ -188,6 +188,10 @@ class ComposeViewModel @Inject constructor(
|
|||||||
.distinctUntilChanged()
|
.distinctUntilChanged()
|
||||||
.subscribe { title -> newState { copy(conversationtitle = title) } }
|
.subscribe { title -> newState { copy(conversationtitle = title) } }
|
||||||
|
|
||||||
|
disposables += prefs.sendAsGroup.asObservable()
|
||||||
|
.distinctUntilChanged()
|
||||||
|
.subscribe { enabled -> newState { copy(sendAsGroup = enabled) } }
|
||||||
|
|
||||||
disposables += attachments
|
disposables += attachments
|
||||||
.subscribe { attachments -> newState { copy(attachments = attachments) } }
|
.subscribe { attachments -> newState { copy(attachments = attachments) } }
|
||||||
|
|
||||||
@@ -389,7 +393,7 @@ class ComposeViewModel @Inject constructor(
|
|||||||
// Toggle the group sending mode
|
// Toggle the group sending mode
|
||||||
view.sendAsGroupIntent
|
view.sendAsGroupIntent
|
||||||
.autoDisposable(view.scope())
|
.autoDisposable(view.scope())
|
||||||
.subscribe { newState { copy(sendAsGroup = !sendAsGroup) } }
|
.subscribe { prefs.sendAsGroup.set(!prefs.sendAsGroup.get()) }
|
||||||
|
|
||||||
// Scroll to search position
|
// Scroll to search position
|
||||||
searchSelection
|
searchSelection
|
||||||
|
|||||||
Reference in New Issue
Block a user