mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-29 12:49:53 +00:00
mobile: remove file on apiSendMessage error (#2487)
This commit is contained in:
parent
c32e45f686
commit
1326701440
2 changed files with 9 additions and 2 deletions
|
@ -376,8 +376,12 @@ fun ComposeView(
|
|||
live = live,
|
||||
ttl = ttl
|
||||
)
|
||||
if (aChatItem != null) chatModel.addChatItem(cInfo, aChatItem.chatItem)
|
||||
return aChatItem?.chatItem
|
||||
if (aChatItem != null) {
|
||||
chatModel.addChatItem(cInfo, aChatItem.chatItem)
|
||||
return aChatItem.chatItem
|
||||
}
|
||||
if (file != null) removeFile(context, file)
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -726,6 +726,9 @@ struct ComposeView: View {
|
|||
}
|
||||
return chatItem
|
||||
}
|
||||
if let file = file {
|
||||
removeFile(file)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue