Commit Graph

28 Commits

Author SHA1 Message Date
Jorge Martín
cdd850d4dd Apply suggestion:
- Added `MediaSource.safeUrl` property replacing `withCleanUrl` method.
- Made `url` private so it can't be used externally.
- Reverted code in `CoilMediaFetcher`
- Also add tests
2026-02-27 09:52:17 +01:00
renovate[bot]
89a6f5a7bf Update metro to v0.11.0 (#6245)
* Update metro to v0.11.0

* Fix `@AssistedInject` usages

Now the injected variables in the factories must match the names in the constructors

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-02-25 16:19:47 +01:00
Benoit Marty
152b351bf3 Store voice player playback index in a datastore. 2025-12-31 11:28:26 +01:00
Benoit Marty
4c0b02ce23 Rename Button to ButtonType to avoid confusion. 2025-12-31 09:51:38 +01:00
Benoit Marty
4f44edf6af VoiceMessageEvents -> VoiceMessageEvent 2025-12-31 09:48:46 +01:00
Benoit Marty
9e25db97f7 Use test extension 2025-12-31 09:47:45 +01:00
Benoit Marty
7e4b4e4076 Avoid reusing the initialState to send event. 2025-12-31 09:46:44 +01:00
Benoit Marty
f59e979aab Create VoicePlayerConfig. 2025-12-31 09:43:25 +01:00
Florian
4e2aeff106 Merge branch 'develop' into feat/variable-playback-speed 2025-12-30 21:29:18 +01:00
Benoit Marty
6284753e59 Fix tests 2025-11-12 23:04:55 +01:00
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
Benoit Marty
0743b56bc4 Always use the handleEvent(s) function the same way. 2025-11-03 18:49:00 +01:00
Benoit Marty
8bfb86683d Fix "Arrow is redundant when parameter list is empty"
And other issues that ktlint now reports
2025-10-30 14:33:25 +01:00
Benoit Marty
826cacf209 Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding 2025-10-22 18:52:37 +02:00
Florian
1f0aa23bff Add variable playback speed feature for voice messages
Add playback speed control for voice messages with support for 0.5×, 1×, 1.5×, and 2× playback speeds. The speed button is displayed above the timestamp and cycles through the available speeds when tapped.
2025-10-09 21:43:47 +02:00
renovate[bot]
c1cd259ce7 Update metro to v0.6.7 (#5416)
* Update metro to v0.6.7

* Replace `@Inject` with `@AssistedInject` where needed

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-09-26 08:16:36 +00:00
Benoit Marty
629fc552e5 Use DependencyHandlerScope.testCommonDependencies() 2025-09-16 14:38:31 +02:00
Jorge Martín
e06bacbff3 Redo DI gradle setup code 2025-09-04 16:49:20 +02:00
Jorge Martín
fc3153bd26 Fix lint issues and restore commented out code 2025-09-04 16:49:18 +02:00
Jorge Martín
92a4b8b66b Start migrating Anvil KSP to Metro 2025-09-04 16:48:34 +02:00
Benoit Marty
ef230e3bda Remove dependency to Anvil from modules that do not use it. 2025-08-25 11:36:42 +02:00
Benoit Marty
03e23477b7 Fix coroutine scope (#4820)
* Inject the session scope instead of the application scope where it's possible.

* Create AppCoroutineScope annotation to let developers explicitly choose the appropriate CoroutineScope when injecting one.
2025-06-04 15:33:51 +00:00
Jorge Martin Espinosa
58a3ea8b1f Add catchingExceptions method to replace runCatching (#4797)
- Add `runCatchingExceptions` and `mapCatchingExceptions` to replace `runCatching` and `mapCatching`.
- Make `tryOrNull { ... }` catch only exceptions too.
- Apply the changes to the whole project.
- Add new Rust fakes for tests to handle the code that's now unblocked - previously it just threw an `UnsatisfiedLinkError` which we ignored.
- Add a new `detekt-rules` project with a `RunCatchingRule` to prevent `runCatching` and `mapCatching` usages.
2025-06-04 09:02:26 +02:00
Benoit Marty
93499910ba Improve audio focus management (#4707)
* Extract Audio focus management to its own modules.

* Request Audio focus when playing a voice message.

* Add missing dependency.
(and remove a duplicated one)

* Request Audio focus when playing a video/audio in the media viewer.

* Pause audio when audio focus is lost.

* Rename class

* Fix tests

* Fix detekt issue.

* Audio focus: let the system handle automatic ducking when playing media.

* Document and update API

* Remove useless space.
2025-05-13 09:54:58 +00: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
5e0d6a6e8a Extract voice message player to its own module 2024-12-13 15:44:58 +01:00