mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-22 12:32:28 +00:00
desktop: fix accept contact/connection in progress staying when changing chat (#6081)
This commit is contained in:
1 parent
428a72757d
commit
db93c85e48
2 files changed
+8
No files matched your search
+7
@@ -31,6 +31,13 @@ fun ComposeContextContactRequestActionsView(
|
||||
val inProgress = rememberSaveable { mutableStateOf(false) }
|
||||
var progressByTimeout by rememberSaveable { mutableStateOf(false) }
|
||||
|
||||
KeyChangeEffect(chatModel.chatId.value) {
|
||||
if (inProgress.value) {
|
||||
inProgress.value = false
|
||||
progressByTimeout = false
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(inProgress.value) {
|
||||
progressByTimeout = if (inProgress.value) {
|
||||
delay(1000)
|
||||
|
||||
+1
@@ -1146,6 +1146,7 @@ fun ComposeView(
|
||||
deleteUnusedFiles()
|
||||
} else if (cs.inProgress) {
|
||||
clearPrevDraft(prevChatId)
|
||||
composeState.value = cs.copy(inProgress = false, progressByTimeout = false)
|
||||
} else if (!cs.empty) {
|
||||
if (cs.preview is ComposePreview.VoicePreview && !cs.preview.finished) {
|
||||
composeState.value = cs.copy(preview = cs.preview.copy(finished = true))
|
||||
|
||||
Reference in new issue
Block a user