mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Don't compress images sent through the Files attachment picker (#6755)
* Don't compress images sent through the Files attachment picker Images and videos picked through the "Attachment" picker are now uploaded without re-encoding, regardless of the "Optimize media quality" setting. The gallery and camera pickers keep the existing behaviour, matching what Element Web/Desktop and most other messengers do. Fixes #6365 Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Make sure we select the right video preset for sending as file Wait for the video size estimations to be calculated before preprocessing the video file --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
+5
@@ -31,6 +31,10 @@ class FakeMediaPreProcessor(
|
||||
var cleanUpCallCount = 0
|
||||
private set
|
||||
|
||||
/** The [MediaOptimizationConfig] passed to the most recent [process] call, or `null` if it was never called. */
|
||||
var lastMediaOptimizationConfig: MediaOptimizationConfig? = null
|
||||
private set
|
||||
|
||||
private var result: Result<MediaUploadInfo> = Result.success(
|
||||
MediaUploadInfo.AnyFile(
|
||||
File("test"),
|
||||
@@ -51,6 +55,7 @@ class FakeMediaPreProcessor(
|
||||
): Result<MediaUploadInfo> = simulateLongTask {
|
||||
processLatch?.await()
|
||||
processCallCount++
|
||||
lastMediaOptimizationConfig = mediaOptimizationConfig
|
||||
result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user