mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-26 20:55:10 +00:00
Cancel Send if we return to fragment.
This plugs a lifecycle hole: previously if you leave this fragment (SelectionConfirmed), you get stuck in that state even if you return.
This commit is contained in:
committed by
Greyson Parrelli
parent
46ec45b985
commit
c2b94274b0
@@ -253,7 +253,9 @@ class MultiselectForwardFragment :
|
||||
val expiringMessages = args.multiShareArgs.filter { it.expiresAt > 0L }
|
||||
val firstToExpire = expiringMessages.minByOrNull { it.expiresAt }
|
||||
val earliestExpiration = firstToExpire?.expiresAt ?: -1L
|
||||
|
||||
if (viewModel.state.value?.stage is MultiselectForwardState.Stage.SelectionConfirmed && contactSearchMediator.getSelectedContacts().isNotEmpty()) {
|
||||
onCanceled()
|
||||
}
|
||||
if (earliestExpiration > 0) {
|
||||
if (earliestExpiration <= now) {
|
||||
handleMessageExpired()
|
||||
|
||||
Reference in New Issue
Block a user