56 Commits

Author SHA1 Message Date
Benoit Marty
1292da2a72 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty
b748fcc631 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty
0a0224b586 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
Jorge Martín
7421e6545c Pass around fromPinnedEvents so we can use it to decide whether to forward the event from the main timeline or the pinned events one 2025-11-03 14:43:57 +01:00
Benoit Marty
e70d767183 Remove context(parentNode: Node) and provide the parent Node as a parameter. 2025-10-31 12:04:57 +01:00
Benoit Marty
05c5f3c914 Use context parameter for the parentNode 2025-10-30 16:32:53 +01:00
Benoit Marty
566515ca88 Remove NodeBuilder to ensure that Params and Callback are always provided. 2025-10-30 16:32:52 +01:00
Benoit Marty
09a18ad7ca Rename fun in Callback for clarity. 2025-10-30 16:32:48 +01:00
Benoit Marty
21bae4aee2 Add Forward action to MediaDetailsBottomSheet. Closes #5454
Improve API of Callback when forwarding Event.
2025-10-28 18:13:53 +01:00
Benoit Marty
ef230e3bda Remove dependency to Anvil from modules that do not use it. 2025-08-25 11:36:42 +02:00
Jorge Martin Espinosa
a170d80cb3 Add media file limit size warning and media quality selection (#5131)
* Add `VideoCompressorPreset` enum

This represents the different compression presets used for processing videos before uploading them

* Add `VideoCompressorHelper` util class to calculate the scaled output size of the video given an input size and its optimal bitrate

Also add `MediaOptimizationConfig` which will be used to decide how to apply compression in `MediaPreProcessor`

* Add `RustMatrixClient.getMaxFileUploadSize()` function and `MaxUploadSizeProvider` so we can import only this functionality into other components

* Try preloading the max file upload size the first time we get network connectivity - it's a best effort

This should help ensure we'll have this value available later, even if we still need to load it asynchronously.

* Split the `compressMedia` preference into `compressImages` and `compressMediaPreset`

* Modify the media processing parts to use the new classes and utils

* Add `MediaOptimizationSelectorPresenter`, which will retrieve the compression values and the max file upload size, also estimating the compressed video file sizes if needed.

* Add a feature flag to allow selecting the media upload quality per upload

* Integrate the previous changes with the attachments preview screen

Add strings from localazy too.

* Adapt the rest of the app calls to upload media to using the media optimization configs

* Allow modifying the default compression values in advanced settings, based on the feature flag value

* Pass the `fileSize` in `MediaUploadInfo` too, to be able to check it against the `maxUploadSize`

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-08-11 17:22:46 +02:00
Benoit Marty
ba59fe27ba Add preview for Text media. 2025-03-18 11:24:13 +01:00
Benoit Marty
c02436d3f0 Update Matrix Room API and allow media swipe on pinned event only. 2025-02-17 16:45:25 +01:00
Benoit Marty
03523c9567 Provide duration 2025-01-22 16:22:18 +01:00
Benoit Marty
7397dde87d Add support for files navigation (when coming from the gallery) 2025-01-22 16:22:15 +01:00
Benoit Marty
05fc76822a Apply dual licenses: AGPL + Element Commercial to file headers.
2 replace all actions have been performed:
- "SPDX-License-Identifier: AGPL-3.0-only" to "SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial"
- "Please see LICENSE in the repository root for full details." to "Please see LICENSE files in the repository root for full details."
2025-01-07 10:05:04 +01:00
Benoit Marty
f8b2f24962 Move share and download actions to the bottom sheet 2024-12-19 16:20:50 +01:00
Benoit Marty
df72ab6a86 Distinguish Audio and Voice media items. 2024-12-16 10:54:47 +01:00
Benoit Marty
caf8c7392e Add audio file support in the gallery and in the media viewer.
Make MediaPlayerControllerView compatible to control audio playback
2024-12-13 09:45:45 +01:00
Benoit Marty
4188d58b56 Implement month separator for the Gallery.
Improve day separator rendering in the timeline.
Use Today, Yesterday, and the name of the day if less than 7 days and do not render the year for the current year.
Improve date format for the media viewer.
Rework how date and time are computed.
ActionListView: Time can take more space, so update the layout.
2024-12-11 23:57:57 +01:00
Benoit Marty
f0fb6698e4 Rename onDone to onBackClick. 2024-12-10 08:51:43 +01:00
Benoit Marty
28725a364f Media Gallery 2024-12-09 16:48:48 +01:00
Benoit Marty
23b5776474 MediaViewer: iterate on design 2024-12-02 17:05:44 +01:00
Benoit Marty
b05d9507ea Move code to the impl module 2024-11-29 09:24:50 +01:00
Benoit Marty
dedfaa998f Improve preview 2024-11-28 16:15:45 +01:00
Benoit Marty
ff3355f453 PlayableState.Playable should only contain data useful for other components. 2024-11-28 14:38:58 +01:00
Benoit Marty
9916efefa2 Cleanup 2024-11-27 16:12:28 +01:00
Benoit Marty
c46c54efa2 Add custom video player controller 2024-11-27 16:05:51 +01:00
Benoit Marty
2724815d79 Fix other API change: body renamed to filename 2024-10-16 16:09:32 +02:00
Benoit Marty
f7a3f707fb Improve mapping regarding filename, caption and formattedCaption 2024-10-08 17:12:48 +02:00
Jorge Martin Espinosa
2efdb3ae45 Centralise the DI code generation logic (#3562)
* Create Anvil extension helper

* Use the helper everywhere
2024-09-30 12:20:28 +00:00
ganfra
5bc89f3c7b Merge pull request #3537 from element-hq/feature/fga/fix_image_viewer_glitch
Fix image viewer glitch
2024-09-26 11:28:34 +02:00
Benoit Marty
0b326d6853 Stop ignoring 2 tests and fix them. 2024-09-25 18:32:43 +02:00
Benoit Marty
cfcd7518dc Fix visibility issue. 2024-09-24 18:23:19 +02:00
Benoit Marty
ae2616d6a2 Less ugly code. 2024-09-24 18:21:30 +02:00
Benoit Marty
4d91260a8e Fix crash when pdf cannot be opened.
https://sentry.tools.element.io/organizations/element/issues/1570011/events/efcaaf7382194fd4b7991ca6b05e7532/
2024-09-24 17:25:51 +02:00
ganfra
dc2e05bafd media viewer: fix glitch when transition from thumbnail to fullview 2024-09-24 16:31:47 +02:00
Benoit Marty
2b016227e9 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
Benoit Marty
a8f0c6c2b2 Add test on function name which may start or end with spaces and fix existing issues. 2024-08-20 17:11:30 +02:00
Jorge Martin Espinosa
950e502ca6 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
87689d787e Lambda parameters in a composable function should be in present tense, not past tense.
https://mrmans0n.github.io/compose-rules/rules/#naming-parameters-properly
2024-05-29 12:18:23 +02:00
Benoit Marty
d4d12503c6 Rename class (code quality) 2024-05-23 14:38:52 +02:00
Benoit Marty
bfedc0b1f1 Need a default value for Modifier. 2024-03-01 18:44:08 +01:00
Benoit Marty
dadef8246c Fix preview error of MediaVideoView. 2024-03-01 18:25:26 +01:00
Benoit Marty
3e65f4bc99 Fix import order. 2024-02-27 14:40:50 +01:00
Benoit Marty
b843b5d9fa Renaming function for code clarity. 2024-02-27 09:53:14 +01:00
Benoit Marty
c35fca3a1b Add test on MediaViewerView 2024-02-27 09:49:10 +01:00
ganfra
9c119d3c49 MediaViewer : fix konsist 2024-02-23 18:55:45 +01:00
ganfra
f0483b8fdb MediaViewer : introduce fullscreen and flick to dismiss behavior 2024-02-23 16:55:41 +01:00
Jorge Martin Espinosa
973c57d401 Update Compound to v0.0.5 and update icons (#2380)
Update Compound to `v0.0.5`:

- Make sure we fix all the breaking changes.
- Update some icons to use the compound version instead.
-Replace icons with their Compound counterparts when possible.
- Clean up unused icons.
- Fix issues with incorrect icons or sizes being used after replacing the temporary icons with the Compound ones.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-02-12 16:41:58 +00:00