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
746699b468
commit
b219c05d06
@@ -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