Commit Graph

22 Commits

Author SHA1 Message Date
bxdxnn 87aff40b26 Support gallery messages (#6519)
* Support gallery messages

* Address review

* Remove unused function

* Fix indent

* Add "Gallery" message prefix

* Support galleries for image editing

* Fix tapping on a tile opens the last item

* Fix overflow count

* Add caption editing to gallery messages

* Use the new gallery string for prefix

* Lock sending galleries behind a feature flag

* Fix detekts

* Fix

* Ensure image edition is saved when navigating

* Fix sending media broken on edited gallery.

* Fix tests

* Order imports

* Remove unused parameters.

* Fix copyright header of new files.

* Fix Konsist test

* Extract new previews to a dedicated file.

* Sync strings

* Remove unused import

* Update screenshots

* Trigger CI

* Remove parameters with default value.

* More cleanup

* Restore sendAsFile behavior.

* Improve Preview.

* Improve Preview.

* Improve Preview.

* Fix gallery sending cancel and retry issue

* Ensure any previous job is cancelled.

* Fix issue in summary message

* Gallery feature is disabled by default.

* Kotlin convention

* Remove useless parenthesis

* Update screenshots

* Fix test

* List -> ImmutableList

* Remove useless code.

* Render formatted caption for attachment list.

* Replace set of Booleans by an enum

* Remove unused model for individual caption in a gallery Event.

* Fix tests

* Fix tests

* Rework MediaViewer entry point.

And ensure that the clicked image from the gallery is displayed first.

* Ensure gallery item can be click in the pinned message list
Improve the gallery item click handling code.

* Improve code and fix separator color
Closes #7101

* React on attachment item click
Improve code

* Improve code and support 0 items in gallery.

* Fix click on attachment item not rendering anything.

---------

Co-authored-by: Benoit Marty <benoitm@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <android@element.io>
2026-06-26 16:00:56 +02:00
Benoit Marty eb31505dc7 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty f86431e663 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty c4e0370f41 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
Benoit Marty 263e761907 Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding 2025-10-22 18:52:37 +02:00
Benoit Marty b6d23b2508 Remove unused dependency on javax.inject:javax.inject 2025-10-02 10:25:54 +02:00
Benoit Marty 255d786b70 Detect mime type when picking a file
The file picker will now try to detect the mime type of the selected file.
If it cannot be detected, it will fallback to `application/octet-stream`.
2025-09-08 11:23:26 +02:00
Jorge Martín 4ab62a6a38 Redo DI gradle setup code 2025-09-04 16:49:20 +02:00
Jorge Martín 29a97fc0d9 Fix lint issues and restore commented out code 2025-09-04 16:49:18 +02:00
Jorge Martín b76a71ebf5 Start migrating Anvil KSP to Metro 2025-09-04 16:48:34 +02:00
Benoit Marty 97f3be3dc5 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 56ef9f1314 DefaultPickerProvider: inject the application context and cleanup dead code.
It seems that `isInTest = true` is not used anymore.
2024-11-20 14:43:29 +01:00
Benoit Marty 6d20fcc29a Use human readable name for filename of taken photos and videos. Fixes #3894. 2024-11-20 14:32:22 +01:00
Jorge Martin Espinosa 79c17f714f Use Anvil KSP instead of the Square KAPT one (#3564)
* Use Anvil KSP instead of the Square KAPT one

* Fix several configuration cache, lint and test issues

* Allow incremental kotlin compilation in the CI

* Workaround Robolectric + Compose issue that caused `AppNotIdleException`

* Update the `enterprise` commit hash

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2024-10-02 11:52:17 +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 45598a885e Rename some class from Impl to Default 2024-05-31 09:47:27 +02: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 764d7685c2 Remove useless constructor keyword. 2023-12-12 15:29:44 +01:00
Florian Renaud 33ee366c8d Fix tests after rebase 2023-05-11 16:30:37 +02:00
Florian Renaud fcdc737a81 WIP pick avatar image 2023-05-11 16:30:37 +02:00
Jorge Martin Espinosa 5eaa40a14b [Media upload] Media pre-processing (#403)
* Create `mediaupload` module for media pre-processing.

* Split `mediapicker` and `mediaupload` modules.
2023-05-10 10:06:56 +02:00