mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 17:35:54 +03:00
Do not delete voice message file to be able to resend.
This commit is contained in:
parent
3a387c5e32
commit
13aee7d162
3 changed files with 6 additions and 2 deletions
1
changelog.d/4006.bugfix
Normal file
1
changelog.d/4006.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Voice Message not sendable if recorded while flight mode was on
|
|
@ -291,6 +291,11 @@ internal class UploadContentWorker(val context: Context, params: WorkerParameter
|
||||||
filesToDelete.forEach {
|
filesToDelete.forEach {
|
||||||
tryOrNull { it.delete() }
|
tryOrNull { it.delete() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delete the temporary voice message file
|
||||||
|
if (params.attachment.type == ContentAttachmentData.Type.AUDIO && params.attachment.mimeType == MimeTypes.Ogg) {
|
||||||
|
context.contentResolver.delete(params.attachment.queryUri, null, null)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1095,8 +1095,6 @@ class RoomDetailFragment @Inject constructor(
|
||||||
|
|
||||||
textComposerViewModel.handle(TextComposerAction.SaveDraft(views.composerLayout.text.toString()))
|
textComposerViewModel.handle(TextComposerAction.SaveDraft(views.composerLayout.text.toString()))
|
||||||
|
|
||||||
// We should improve the UX to support going into playback mode when paused and delete the media when the view is destroyed.
|
|
||||||
roomDetailViewModel.handle(RoomDetailAction.EndAllVoiceActions)
|
|
||||||
views.voiceMessageRecorderView.initVoiceRecordingViews()
|
views.voiceMessageRecorderView.initVoiceRecordingViews()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue