mobile: delete XFTP files after uploading (#2133)
This commit is contained in:
parent
15a93014a5
commit
d3268e4a72
@ -1440,8 +1440,18 @@ open class ChatController(var ctrl: ChatCtrl?, val ntfManager: NtfManager, val a
|
|||||||
chatItemSimpleUpdate(r.user, r.chatItem)
|
chatItemSimpleUpdate(r.user, r.chatItem)
|
||||||
is CR.SndFileProgressXFTP ->
|
is CR.SndFileProgressXFTP ->
|
||||||
chatItemSimpleUpdate(r.user, r.chatItem)
|
chatItemSimpleUpdate(r.user, r.chatItem)
|
||||||
is CR.SndFileCompleteXFTP ->
|
is CR.SndFileCompleteXFTP -> {
|
||||||
chatItemSimpleUpdate(r.user, r.chatItem)
|
chatItemSimpleUpdate(r.user, r.chatItem)
|
||||||
|
val cItem = r.chatItem.chatItem
|
||||||
|
val mc = cItem.content.msgContent
|
||||||
|
val fileName = cItem.file?.fileName
|
||||||
|
if (
|
||||||
|
mc is MsgContent.MCFile
|
||||||
|
&& fileName != null
|
||||||
|
) {
|
||||||
|
removeFile(appContext, fileName)
|
||||||
|
}
|
||||||
|
}
|
||||||
is CR.CallInvitation -> {
|
is CR.CallInvitation -> {
|
||||||
chatModel.callManager.reportNewIncomingCall(r.callInvitation)
|
chatModel.callManager.reportNewIncomingCall(r.callInvitation)
|
||||||
}
|
}
|
||||||
|
@ -1359,6 +1359,12 @@ func processReceivedMsg(_ res: ChatResponse) async {
|
|||||||
chatItemSimpleUpdate(user, aChatItem)
|
chatItemSimpleUpdate(user, aChatItem)
|
||||||
case let .sndFileCompleteXFTP(user, aChatItem, _):
|
case let .sndFileCompleteXFTP(user, aChatItem, _):
|
||||||
chatItemSimpleUpdate(user, aChatItem)
|
chatItemSimpleUpdate(user, aChatItem)
|
||||||
|
let cItem = aChatItem.chatItem
|
||||||
|
let mc = cItem.content.msgContent
|
||||||
|
if case .file = mc,
|
||||||
|
let fileName = cItem.file?.filePath {
|
||||||
|
removeFile(fileName)
|
||||||
|
}
|
||||||
case let .callInvitation(invitation):
|
case let .callInvitation(invitation):
|
||||||
m.callInvitations[invitation.contact.id] = invitation
|
m.callInvitations[invitation.contact.id] = invitation
|
||||||
activateCall(invitation)
|
activateCall(invitation)
|
||||||
|
Loading…
Reference in New Issue
Block a user