mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-22 13:48:52 +01:00
Moved Scheduled Message Toast to main thread.
This commit is contained in:
@@ -135,6 +135,7 @@ class ComposeViewModel @Inject constructor(
|
|||||||
private val searchSelection: Subject<Long> = BehaviorSubject.createDefault(-1)
|
private val searchSelection: Subject<Long> = BehaviorSubject.createDefault(-1)
|
||||||
|
|
||||||
private var shouldShowContacts = threadId == 0L && addresses.isEmpty()
|
private var shouldShowContacts = threadId == 0L && addresses.isEmpty()
|
||||||
|
private var showScheduledToast = false
|
||||||
|
|
||||||
private var bluetoothMicManager: BluetoothMicManager? = null
|
private var bluetoothMicManager: BluetoothMicManager? = null
|
||||||
|
|
||||||
@@ -1118,7 +1119,7 @@ class ComposeViewModel @Inject constructor(
|
|||||||
)
|
)
|
||||||
).also {
|
).also {
|
||||||
newState { copy(scheduled = 0) }
|
newState { copy(scheduled = 0) }
|
||||||
context.makeToast(R.string.compose_scheduled_toast)
|
showScheduledToast = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// sending a group message
|
// sending a group message
|
||||||
@@ -1157,7 +1158,13 @@ class ComposeViewModel @Inject constructor(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.doOnNext { view.focusMessage() }
|
.doOnNext {
|
||||||
|
view.focusMessage()
|
||||||
|
if (showScheduledToast) {
|
||||||
|
context.makeToast(R.string.compose_scheduled_toast)
|
||||||
|
showScheduledToast = false
|
||||||
|
}
|
||||||
|
}
|
||||||
.autoDisposable(view.scope())
|
.autoDisposable(view.scope())
|
||||||
.subscribe()
|
.subscribe()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user