mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-05 12:54:35 +00:00
Make sure we clean up the pre-processed and uploaded media (#5039)
* Add `MediaSender.cleanUp()` and `MediaPreProcessor.cleanUp()` methods: this will remove the temporary files created when pre-processing media before sending them. * Make sure we clean up also the previous temporary media. * Fix the condition for the custom back handler in the attachments preview screen * Tests: check the clean up is performed when needed
This commit is contained in:
committed by
GitHub
parent
9f11884ddd
commit
d53457ec66
+7
@@ -26,6 +26,9 @@ class FakeMediaPreProcessor(
|
||||
var processCallCount = 0
|
||||
private set
|
||||
|
||||
var cleanUpCallCount = 0
|
||||
private set
|
||||
|
||||
private var result: Result<MediaUploadInfo> = Result.success(
|
||||
MediaUploadInfo.AnyFile(
|
||||
File("test"),
|
||||
@@ -108,4 +111,8 @@ class FakeMediaPreProcessor(
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun cleanUp() {
|
||||
cleanUpCallCount += 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user