Commit Graph

70 Commits

Author SHA1 Message Date
Benoit Marty 585b6a94f3 Delete temporary created files. 2024-11-08 10:11:06 +01:00
Benoit Marty 0c841442d9 Add a log when deleting a file. 2024-11-08 10:11:06 +01:00
Benoit Marty 58a0875c5d Do not delete the original file when sending a media. Fixes #3800. 2024-11-08 10:11:06 +01:00
Benoit Marty 13ec1838c0 MediaPreProcessor: remove default value of parameter deleteOriginal. No functional change here. 2024-11-08 10:11:06 +01:00
Benoit Marty 223eae9602 Send caption with media 2024-11-04 14:24:39 +01:00
Jorge Martin Espinosa f7861acd7f Remove all GPS metadata from images uploaded as media (#3781)
Previously a minimal set of tags were removed, but we should make sure every single one of them is removed.
2024-11-04 10:31:55 +01:00
Benoit Marty 1061ea0679 Fix test. 2024-10-31 18:05:13 +01:00
Benoit Marty 48133dcca4 Rename file. 2024-10-31 18:01:56 +01:00
Benoit Marty 74037514c0 Compress png file and generate png thumbnail for png files.
Fix tests
2024-10-31 15:51:45 +01:00
Benoit Marty 1c7b3df10e Optimize media: Compress Png to Png. 2024-10-31 11:04:11 +01:00
Benoit Marty cabc8c673c Optimize media: always compress video to have maximum 1080 at the greatest size. 2024-10-31 10:53:44 +01:00
Benoit Marty 4b98ee92e3 Improve FakeMatrixRoom to be able to check all the parameters. 2024-10-30 18:39:55 +01:00
Benoit Marty 3a6d65b75d Fix test. 2024-10-28 13:52:53 +01:00
Benoit Marty 846dbc2b18 Add media upload setting.
Compress media regarding the settings.
Image compression change quality to 78%
Video compression change size to 720 x 48
2024-10-28 10:56:58 +01:00
Jorge Martin Espinosa eeec7cc785 Centralise the DI code generation logic (#3562)
* Create Anvil extension helper

* Use the helper everywhere
2024-09-30 12:20:28 +00:00
Benoit Marty f61df38e55 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
Benoit Marty 5bda29ca7e Rework FakeMatrixRoom so that it contains only lambdas. (#3229)
* Upgrade lint to 8.7.0-alpha01

* FakeMatrixRoom: lambda everywhere

Fix test compilation issues
2024-07-22 10:39:48 +02:00
Jorge Martin Espinosa b0cebf5ca0 Improve screenshot testing with ComposablePreviewScanner (#3125)
* Use ComposablePreviewScanner to rework how screenshot testing works
* Add test sharding
* Update screenshots
* Fixes for Element Gallery

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-07-03 13:05:06 +02:00
Benoit Marty ec8cb2e32f Change Test class suffix. 2024-05-30 10:11:18 +02:00
Jorge Martin Espinosa 04e503177b Notifications: simplify the flow by removing persistence (#2924)
* Notifications: simplify the flow by removing persistence. 
* Bump of minSdk to `24` (Android 7).
* Add migration to remove `notification.bin` file
2024-05-29 08:03:23 +00:00
Jorge Martín cc9c04b1a3 Fix SDK integration 2024-03-20 09:36:35 +01:00
Benoit Marty 5d086ad82d Fix moar ktlint issues 2024-01-11 10:02:10 +01:00
renovate[bot] c8bd362397 Update plugin ktlint to v12.1.0 (#2200)
* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-10 16:22:24 +01:00
Benoit Marty 6b611bedfc Move files to correct package. 2023-12-19 11:07:12 +01:00
Benoit Marty 7889ff118c Restore test for image sending, now that computing Thumbnail can fail. 2023-12-19 11:05:40 +01:00
Benoit Marty ca751aac12 ThumbnailUtils.createImageThumbnail can throw IOException, and we can ignore it. 2023-12-19 10:47:31 +01:00
Benoit Marty d3654ef284 blurhash cannot be null here 2023-12-19 10:43:28 +01:00
Benoit Marty ee766ecf26 Providing a thumbnail when sending a media is now optional. 2023-12-19 10:41:44 +01:00
Benoit Marty cf8abae20c Cleanup 2023-11-29 17:27:16 +01:00
Benoit Marty 62833c8bec Disable failing tests for AndroidMediaPreProcessor 2023-11-29 17:03:27 +01:00
Benoit Marty 7e8794bc6e Add tests for AndroidMediaPreProcessor 2023-11-29 17:03:27 +01:00
Benoit Marty 655d8305a1 Using Exception is OK here. 2023-11-29 17:03:27 +01:00
Benoit Marty 048ab7c603 Provide CoroutineDispatchers to ImageCompressor 2023-11-29 17:02:38 +01:00
Benoit Marty 1df3817808 Use MimeTypes object instead of hard-coded strings. 2023-11-27 21:58:58 +01:00
Benoit Marty 9059126b2e Use kotlin.time.Duration instead of java.time.Duration. Also use Duration in TimelineItemVideoContent, like in TimelineItemAudioContent and TimelineItemVoiceContent 2023-11-27 21:58:58 +01:00
Marco Romano 0e4141863b Always treat waveform as List<Float> (#1663)
[MSC3246](https://github.com/matrix-org/matrix-spec-proposals/pull/3246) specifies the waveform as a list of ints because:

> Because floating point numbers are not allowed in Matrix events

Though DSP on audio data is almost always done using their floating point representation.
This PR brings the float<->int rescaling in the `matrix` module so that the application code can always work with float waveform samples.
2023-10-27 12:49:58 +00:00
jonnyandrew b476654489 Record and send voice messages (#1596)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-23 17:28:00 +00:00
Jorge Martin Espinosa ffef9d936a Fix: WebP images can't be sent as media. (#1501)
* Fix: WebP images can't be sent as media.

* Place the `BitmapFactory.Options` mode change and comment where it belongs.
2023-10-06 09:18:11 +00:00
Jorge Martin Espinosa 1d3d1fe480 Fix the orientation of sent images (#1190)
* Fix the orientation of sent images

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2023-08-30 17:02:37 +00:00
Benoit Marty 55255735d7 Merge branch 'develop' into feature/bma/dataObject 2023-08-28 10:56:02 +02:00
Jorge Martin Espinosa 648e2c378d Fix sent videos being cropped (#1124) 2023-08-24 09:41:58 +02:00
Benoit Marty 7083abcf09 migrate object to data object (#1135) 2023-08-24 09:32:44 +02:00
Jorge Martin Espinosa 983b83a56f Media upload cancellation (#1058)
* Initial implementation of media upload cancellation

* Add tests

* Add changelog

* Update screenshots

* Add documentation

* Fix lint issues

* Fix review comments

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-17 09:02:03 +00:00
Benoit Marty c75eabbcb0 Enable detekt rules UnnecessaryParentheses and cleanup the code. 2023-07-20 18:08:08 +02:00
Benoit Marty 2928073e22 Enable detekt rules UnusedImports and cleanup the code. 2023-07-20 18:00:23 +02:00
Benoit Marty 1f3efdfe46 Fix warning (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q here) 2023-07-20 15:34:55 +02:00
Benoit Marty 9fbdef4bd2 Fix warning ('when' is exhaustive so 'else' is redundant here) 2023-07-20 15:33:00 +02:00
ganfra e9a34eb46d Media: upload audio 2023-07-13 20:34:07 +02:00
ganfra 3d0e6a4130 Media: render audio content 2023-07-13 18:09:58 +02:00
ganfra f090aa021e Media upload: branch progress callback to UI 2023-06-28 23:14:08 +02:00