Commit graph

29 commits

Author SHA1 Message Date
Benoit Marty
035e527101 Depend on api not impl module. 2026-04-08 18:04:46 +02:00
Jorge Martín
5fb9dcb0da 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]
896d62a81e
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
987779af66 Store voice player playback index in a datastore. 2025-12-31 11:28:26 +01:00
Benoit Marty
07be3d01b2 Rename Button to ButtonType to avoid confusion. 2025-12-31 09:51:38 +01:00
Benoit Marty
a10ac8aaab VoiceMessageEvents -> VoiceMessageEvent 2025-12-31 09:48:46 +01:00
Benoit Marty
6b2c22766c Use test extension 2025-12-31 09:47:45 +01:00
Benoit Marty
9bd492f613 Avoid reusing the initialState to send event. 2025-12-31 09:46:44 +01:00
Benoit Marty
be5b53781a Create VoicePlayerConfig. 2025-12-31 09:43:25 +01:00
Florian
0c004d933c
Merge branch 'develop' into feat/variable-playback-speed 2025-12-30 21:29:18 +01:00
Benoit Marty
df11dbdf97 Fix tests 2025-11-12 23:04:55 +01: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
fdd4e2115c Always use the handleEvent(s) function the same way. 2025-11-03 18:49:00 +01:00
Benoit Marty
eef0fbf4be 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
263e761907 Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding 2025-10-22 18:52:37 +02:00
Florian
5e07691fcd
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]
5b9ce7a210
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
a575019760 Use DependencyHandlerScope.testCommonDependencies() 2025-09-16 14:38:31 +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
1682fd4c2c Remove dependency to Anvil from modules that do not use it. 2025-08-25 11:36:42 +02:00
Benoit Marty
5f191d9f9c
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
efdc10e60a
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
0255111528
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
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
f74258d794 Extract voice message player to its own module 2024-12-13 15:44:58 +01:00