Commit Graph

88 Commits

Author SHA1 Message Date
Jorge Martín
92a4b8b66b Start migrating Anvil KSP to Metro 2025-09-04 16:48:34 +02:00
renovate[bot]
07edaa3dcb Update dependency org.matrix.rustcomponents:sdk-android to v25.7.28 (#5088)
* Update dependency org.matrix.rustcomponents:sdk-android to v25.7.28

* Adapt to SDK changes

* Remove Sonatype repos: use Maven Central instead

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-07-29 11:45:52 +02: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
819d9c7da0 Update UnifiedPush library (#4358)
* Upgrade `com.github.UnifiedPush:android-connector` from 2.4.0 to 3.0.4

* Do not use jitpack to get the unified push library

* implementation is ok

* Exclude com.google.crypto.tink to fix a compilation issue

* Fix tests.

* Update log.

* Revert "Exclude com.google.crypto.tink to fix a compilation issue"

This reverts commit f431ebe3b78a06282e0ee74c9f428702d463df45.

* Fix compilation issue after rebase.

* Exclude com.google.crypto.tink again.

* Try version 3.0.8

* Use latest version 3.0.9

* Replace tink exclusion with dependency resolution

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2025-05-26 14:56:54 +02:00
Benoit Marty
5556cb1573 Get library ComposablePreviewScanner from maven and update to the latest version.
Renovate will now be able to upgrade it when necessary.
2025-02-27 09:05:04 +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
cfc093b401 Remove :samples:minimal module 2024-11-14 09:06:13 +01:00
Benoit Marty
86763762e6 Migrate license to AGPL 2024-09-06 17:45:03 +02:00
Benoit Marty
b804e5488b Create module :appicon:enterprise 2024-07-03 17:20:13 +02:00
Benoit Marty
ca8f13cfaf Move application icon to their own module, to be able to have another icon for Element Enterprise 2024-07-03 15:15:53 +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
d43a8c8bea Add first EnterpriseService. 2024-06-26 11:59:41 +02:00
Jorge Martin Espinosa
35702c04e9 Sign in with QR code (#2793)
* Add QR code login.
* Add FF to disable it in release mode.
* Force portrait orientation on the login flow.
* Create `NumberedList` UI components.
* Improve camera permission dialog.
* Make nodes in qrcode feature use `QrCodeLoginScope` instead of `AppScope`
* Bump SDK version.
* Fix maestro tests

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-05-31 14:38:27 +02:00
Jorge Martin Espinosa
902dd24e72 Plain text editor implementation based on markdown input (#2840)
* Add plain text editor based on markdown input
- Fix autofocus of message composer.
- Remove `Message` data class, fetch the details in `MessagesPresenter` instead.
- Remove `enable rich text` option from advanced settings, set it as a build configuration instead.
* Fix MentionSpanProvider
* Bump RTE library to released `v2.37.3`

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-05-21 13:58:53 +02:00
ganfra
cd28687eb4 StartDM : add tests 2023-11-30 18:05:26 +01:00
Jorge Martin Espinosa
a8b85fb4e6 Extract compound tokens and theming to compound-android library (#1888)
* Replace tokens & icons with the external Compound ones

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-27 10:30:07 +01:00
David Langley
5a646a8362 Remove WaveformProgressIndicator and waveform library and lint.
-Remove WaveformProgressIndicator - Remove waveform library
- lint.
2023-10-26 08:58:03 +01:00
Marco Romano
3b20120705 Receive and play a voice message (#1503)
## Type of change

- [x] Feature
- [ ] Bugfix
- [ ] Technical
- [ ] Other :

## Content

This PR consists of several macro-blocks separated by path/package:
- `messages.impl.mediaplayer` : Global (room-wide) media player, now used only for voice messages but could be used for all media within EX in the future. It is backed by media3's exoplayer. Currently not unit-tested because mocking exoplayer is not trivial.
- `messages.impl.voicemessages.play` : Business logic of a timeline voice message. This is all the logic that manages the voice message bubble.
- `messages.impl.timeline.model` & `messages.impl.timeline.factories`: Timeline code that takes care of creating the `content` object for voice messages.
-  `messages.impl.timeline.components` : The actual View composable that shows the UI inside a voice message bubble.

All the rest is just small related changes that must be done here and there in existing code.

From a high level perspective this is how it works:
- Voice messages are unlike other message bubbles because they carry state (i.e. playing, downloading...) so they have a Presenter managing this state.
- Media content (i.e. the ogg file) of a voice message is downloaded from the rust SDK on first play then stored in a voice messages cache (see the `VoiceMessageCache` class, it is just a subdirectory in the app's cacheDir which is indexed by the matrix content uri). All further play attempts are done from the cache without hitting the rust SDK anymore.
- Playback of the ogg file is handled with the `VoiceMessagePlayer` class which is basically a "view" of the global `MediaPlayer` that allow the voice message to only see the media player state belonging to its media content. 
- Drawing of the waveform is done with an OSS library wrapped in the `WaveformProgressIndicator` composable.

Known issues:
 - The waveform has no position slider.
 - The waveform (and together with it the whole message bubble) is taller than the actual Figma design.
 - Swipe to reply for voice messages is disabled to avoid conflict with the audio scrubbing gesture (to reply to a voice message you have to use the long press menu).
 - The loading indicator is always shown (there is no delay).
 - Voice messages don't stop playing when redacted.

## Motivation and context

https://github.com/vector-im/element-meta/issues/2083

## Screenshots / GIFs

Provided by Screenshot tests in the PR itself.
2023-10-24 21:47:51 +00:00
Jorge Martin Espinosa
5e547269e7 Integrate Element Call with widget API (#1581)
* Integrate Element Call with widget API.

- Add `appconfig` module and extract constants that can be overridden in forks there.
- Add an Element Call feature flag, disabled by default.
- Refactor the whole `ElementCallActivity`, move most logic out of it.
- Integrate with the Rust Widget Driver API (note the Rust SDK version used in this PR lacks some needed changes to make the calls actually work).
- Handle calls differently based on `CallType`.
- Add UI to create/join a call.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-19 15:38:43 +00:00
Benoit Marty
bdd7ecd789 Move konsist test to their own module. 2023-10-12 18:41:38 +02:00
Jorge Martin Espinosa
194e693219 Bump telephoto to 0.6.0-SNAPSHOT to diagnose crash (#1164) 2023-08-29 09:59:01 +02:00
Benoit Marty
f6f03d0c5c Fix compilation issue. 2023-07-26 17:36:36 +02:00
Jorge Martin Espinosa
a9d1a299f5 Prepare update to Rust SDK 0.1.36 (#966)
* Update to Rust SDK 0.1.36

* Cancel fetching members when the we exit the room
2023-07-26 14:22:09 +00:00
Jorge Martin Espinosa
9170c5eb71 Display room invitation notification (#735)
* Notifications: Add some extra mappings so we keep the original contents and can pass it later to an UI layer

* Fix notifications not appearing for a room if the app was on that room when it went to background.

* Modernize how we create spannable strings for notifications, remove unneeded dependency

* Remove actions from invite notifications temporarily

* Add `NotificationDrawerManager` interface to be able to clear membership notifications when accepting or rejecting a room invite

* Fix tests

* Add comment to clarify some weird behaviours

* Address review comments

* Set circle shape for `largeBitmap` in message notifications

* Fix no avatar in DM rooms

* Fix rebase issues

* Add invite list pending intent:

- Refactor pending intents.
- Make `DeepLinkData` a sealed interface.
- Fix and add tests.

* Rename `navigate__` functions to `attach__`

* Add an extra test case for the `InviteList` deep link

* Address most review comments.

* Fix rebase issue

* Add fallback notification type, allow dismissing invite notifications.

Fallback notifications have a different underlying type and can be dismissed at will.

* Fix tests
2023-07-10 14:34:58 +02:00
Yoan Pintas
d2263372d2 Init analytics modules (#350) 2023-06-05 13:11:34 +00:00
Benoit Marty
14366e18e7 Use gradle logger to filter out when running with only warning logs. 2023-05-25 12:03:51 +02:00
Benoit Marty
981632b7a4 Sort by filename for easier search in the logs. 2023-05-25 11:51:46 +02:00
Benoit Marty
f4e4be7479 Improve asXId and make tests pass in release and debug mode. 2023-04-12 09:50:04 +02:00
Benoit Marty
1a33f6fc50 Merge branch 'develop' into feature/bma/push 2023-04-06 09:13:24 +02:00
Benoit Marty
64f4740029 Import some stuff about Push and notification from Element Android - WIP 2023-04-05 16:18:44 +02:00
Florian Renaud
708d7b2fb4 convert rustsdk gradle file to kts 2023-04-04 15:44:37 +02:00
Benoit Marty
486e63dcd3 Include again the module rustsdk, since it's not detected by the fun includeProjects() 2023-03-28 21:58:46 +02:00
Benoit Marty
eb76a5a43f Include all libraries and all services. 2023-03-28 15:04:59 +02:00
Benoit Marty
1013e73ff8 Limit the recursivity to 1, when searching for gradle modules. 2023-03-28 14:51:30 +02:00
ganfra
dde0f3480f Merge branch 'develop' into feature/fga/module_templates 2023-03-27 17:21:45 +02:00
ganfra
111833d3d5 Remove old template project from settings.gradle 2023-03-27 17:18:11 +02:00
ganfra
d60a653d83 Add utility methods for automatically including api/impl feature modules 2023-03-23 18:06:32 +01:00
Jorge Martin Espinosa
4a1a338e07 Move StateMachine to its own module. (#257) 2023-03-23 16:49:15 +00:00
Maxime NATUREL
09af485560 Create a reusable selectusers feature module 2023-03-22 12:25:58 +01:00
Benoit Marty
f4661781b9 Merge pull request #224 from vector-im/bma/analytics
Add utility modules
2023-03-21 13:18:10 +01:00
Benoit Marty
33c02f054e Merge branch 'develop' into feature/bma/networkModule 2023-03-17 13:39:01 +01:00
Jorge Martin Espinosa
9639d62bb3 Add Session Verification flow (#197) 2023-03-17 10:07:19 +01:00
Benoit Marty
69c3c8136f Add :services:toolbox modules. 2023-03-17 10:05:40 +01:00
Benoit Marty
5421957b8e Add :services:analytics modules. For now import the current plan.
This will allow to import existing class from EA and not break compatibility with existing analytics call.
2023-03-17 10:05:40 +01:00
Benoit Marty
c9c1a77eab Add :libraries:network module 2023-03-16 15:31:57 +01:00
Benoit Marty
137e9b61f0 Introduce AppNavigationStateService. 2023-03-16 11:30:09 +01:00
ganfra
184a68b637 [Architecture] split createroom feature module 2023-03-09 12:31:30 +01:00
ganfra
ed2706f7ef Merge branch 'develop' into feature/fga/improve_node_architecture 2023-03-09 12:00:34 +01:00
ganfra
b07e0e62b1 [Architecture] clean and makes compile 2023-03-09 10:18:25 +01:00
ganfra
7051bfc14e [Architecture] split all feature modules to api/impl 2023-03-08 16:13:45 +01:00