mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-30 14:15:55 +00:00
ui: delay closing support view on acceptance for items to be marked read (#6244)
* ui: delay closing support view on acceptance for items to be marked read * move to coroutine * increase delay
This commit is contained in:
@@ -360,7 +360,10 @@ struct ChatView: View {
|
||||
}
|
||||
.onChange(of: chatModel.secondaryPendingInviteeChatOpened) { opened in
|
||||
if im.secondaryIMFilter != nil && !opened {
|
||||
dismiss()
|
||||
Task {
|
||||
try? await Task.sleep(nanoseconds: 650_000000)
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
.onChange(of: chatModel.openAroundItemId) { openAround in
|
||||
|
||||
@@ -2913,10 +2913,13 @@ object ChatController {
|
||||
&& ModalManager.end.hasModalOpen(ModalViewId.SECONDARY_CHAT)
|
||||
&& chatModel.secondaryChatsContext.value?.secondaryContextFilter is SecondaryContextFilter.GroupChatScopeContext
|
||||
) {
|
||||
withContext(Dispatchers.Main) {
|
||||
chatModel.secondaryChatsContext.value = null
|
||||
CoroutineScope(Dispatchers.Default).launch {
|
||||
delay(1000L)
|
||||
withContext(Dispatchers.Main) {
|
||||
chatModel.secondaryChatsContext.value = null
|
||||
}
|
||||
ModalManager.end.closeModals()
|
||||
}
|
||||
ModalManager.end.closeModals()
|
||||
}
|
||||
}
|
||||
is CR.JoinedGroupMember ->
|
||||
|
||||
Reference in New Issue
Block a user