Commit graph

1300 commits

Author SHA1 Message Date
ganfra
1246bfa21e deps(sdk) : add fallbackToServer on userIdentity api. 2025-11-24 20:22:11 +01:00
ganfra
abcb38ef06 Merge branch 'develop' into renovate/org.matrix.rustcomponents-sdk-android-25.x 2025-11-19 13:10:18 +01:00
ganfra
fe65ba1839 deps(sdk): fix api usages 2025-11-19 13:07:59 +01:00
Jorge Martin Espinosa
f78c80803b
Add some performance metrics for Sentry (#5760)
- Add `AnalyticsService.startTransaction(...)` to start a logging transaction that can be uploaded to Sentry if the user enabled the analytics upload.
- Add `AnalyticsTransaction` wrapper to abstract the Sentry ones.
- Added several helper methods to improve the UX around these transactions.
- Then measure:
  - Time until the first sync, and how it ended.
  - Time until the first rooms are displayed.
  - Time to load a room or a preview.
  - Time to load a timeline.
2025-11-19 11:42:55 +00:00
Benoit Marty
dc65191e2c Improve API: use RoomId instead of String. 2025-11-19 10:14:03 +01:00
Benoit Marty
2bdac6d81a
Merge pull request #5755 from element-hq/feature/bma/cleanupDb
Remove unused `slidingSyncProxy` from DB.
2025-11-18 17:42:09 +01:00
Benoit Marty
9247c2da79 Remove unused import. 2025-11-18 16:42:34 +01:00
Benoit Marty
310848ee38
Merge pull request #5722 from element-hq/feature/bma/moduleCleanup
Module cleanup
2025-11-18 16:14:10 +01:00
Benoit Marty
a9ae55703a Remove unused slidingSyncProxy from DB. 2025-11-18 15:58:22 +01:00
Jorge Martin Espinosa
740e486cd0
Revert "Stop overriding the homeserver when restoring a Client (#5753)" (#5754)
This reverts commit 21ced9e105.
2025-11-18 15:16:34 +01:00
Jorge Martin Espinosa
21ced9e105
Stop overriding the homeserver when restoring a Client (#5753)
This isn't necessary and overrides the existing data previously saved by the SDK, resulting in losing data such as the `Client::server` (the discovery server URL).

In turn, this caused the app to be unable to refresh the server info in some homeservers.
2025-11-18 11:48:42 +01:00
Jorge Martin Espinosa
36ecb440ef
Add media retention policy (#5749)
* Add media retention policy.

Add `ByteSize` class to help with conversions between byte units.

* Use bit shifting instead of multiplication

Improve the tests too
2025-11-18 07:53:45 +00:00
Benoit Marty
a7ffe8087c @Inject is not necessary here. 2025-11-17 21:35:56 +01:00
ganfra
5046148708 change(room members): address PR reviews 2025-11-14 12:27:45 +01:00
ganfra
9618e9ad51 quality : format code 2025-11-13 16:00:07 +01:00
ganfra
7400fd6c84 Merge branch 'develop' into feature/fga/members_improvements 2025-11-13 14:30:29 +01:00
Benoit Marty
8285478688 API modules do not need to setup dependency injection.
Move the implementation to the impl modules.
2025-11-12 19:05:39 +01:00
ganfra
3cc455c1aa change(room members): makes sure to subscribe to timeline items changes 2025-11-12 17:53:52 +01:00
renovate[bot]
e7e2f38c3c
Update dependency org.matrix.rustcomponents:sdk-android to v25.11.11 (#5716)
* Update dependency org.matrix.rustcomponents:sdk-android to v25.11.11

* Fix API breaks:
  - `Client.loginWithQrCode` is now `Client.newLoginWithQrCodeHandler`.
  - Rust's `OtherState` can now have `RoomCreate` and `RoomHistoryVisibility` values.
  - Fix fixtures

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-11-11 15:29:37 +00:00
SpiritCroc
6416c79925
Fix rendering notifications if event ID is duplicated (#5711) 2025-11-10 21:54:09 +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
77bc9b811a
Merge pull request #5692 from element-hq/feature/bma/loginFlow
Improve account provider selection during the login flow
2025-11-07 16:48:03 +01:00
Benoit Marty
cc01e19bf7 Use isNull() 2025-11-07 11:05:13 +01:00
Benoit Marty
98792c9562 Improve error mapping 2025-11-07 10:08:14 +01:00
Benoit Marty
e12726f405 Improve error mapping 2025-11-07 09:52:04 +01:00
ganfra
0cad4175fa Merge branch 'develop' into feature/fga/role_and_permissions_rework 2025-11-06 13:51:04 +01:00
Benoit Marty
cee6475eb8 Do not override the value of url returned by the SDK 2025-11-06 12:29:08 +01:00
Benoit Marty
0be6d13025 MatrixAuthenticationService: remove fun getHomeserverDetails(): StateFlow<MatrixHomeServerDetails?>. The MatrixHomeServerDetails are now return by setHomeserver 2025-11-06 12:22:48 +01:00
ganfra
910bac9c4e misc: introduce @RoomCoroutineScope 2025-11-06 10:59:50 +01:00
Benoit Marty
e9cab238be Add the user certificate if any when creating Matrix Client. 2025-11-05 18:05:11 +01:00
Benoit Marty
172d1ab9c4
Merge pull request #5677 from element-hq/feature/bma/loadingVerificationAction
Make sure we know the session verification state before showing the options to verify the session
2025-11-04 16:32:17 +01:00
Jorge Martin Espinosa
7aa564e74d
Use the SDK Client to check whether a homeserver is compatible (#5664)
* Use the SDK `Client` to check whether a HS is compatible

* Remove usage of unused `WellKnown`, keep `ElementWellKnown`

* Make `HomeServerLoginCompatibilityChecker.check` return `true/false` values to distinguish non-valid homeservers from a failed check

* Use `inMemoryStore` and `serverNameOrHomeserverUrl`

* Do some cleanup of `isValid` and `isWellknownValid`

* Make the debounce for starting the search a bit higher, as checking for the homeservers seems more resource-intensive now
2025-11-04 15:43:00 +01:00
Benoit Marty
ff67c8beef Make sure we know the session verification state before showing the option to verify the session. #5521 2025-11-04 12:19:09 +01:00
Jorge Martin Espinosa
d6e0489701
Try fixing 'Timeline Event object has already been destroyed' (#5675)
This will display a fallback notification. I don't see how the current code could cause it, but I tried to re-structure it a bit so we don't have nested `use` usages and `timestamp` is fetched ahead of time.
2025-11-04 11:36:17 +01:00
renovate[bot]
98acdadc6f
fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.10.31 (#5657)
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.10.31

* Fix API breaks

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-11-03 10:48:06 +01:00
Jorge Martin Espinosa
eb08639776
Split notifications for messages in threads (#5595)
* Separate thread notifications into their own notifications when the feature flag is enabled.

Otherwise, set the `threadId` to null so it'll behave as usual. It's done this way to avoid having to inject `FeatureFlagService` in several places.

* Add permalink navigation to threads from notifications, focusing on the latest event in the list of messages of the notification tapped

* Fix redactions in threads

* Clear notifications for a thread when visiting it

* Fix opening a thread happening twice, first because of the `openThreadId` value, then because of the `focusedEventId` one

* Make opening a room through a notification also focus on the latest event

* Add helper `NotificationCreator.messageTag` function

* Remove unused `ROOM_CALL_NOTIFICATION_ID`: `FOREGROUND_SERVICE_NOTIFICATION_ID`+ `ForegroundServiceType` is used instead

* Simplify `DefaultDeepLinkCreator`

* Make sure the main timeline focuses on the thread root id too when navigating to a thread

* Handle "Mark as read" action for thread notification, using `timeline.markAsRead`

* Log failures to mark rooms as read using the notification action

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-10-30 15:15:00 +00: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
Jorge Martin Espinosa
6c3b280ecd
Fix marking a room as read re-instantiates its timeline (#5628)
* Add `Timeline.markAsRead` to avoid reinstantiating the timeline using `Room.markAsRead`

* Mark as read when exiting the room screen, destroy the timeline when fully closed

* Ensure `MarkAsFullyReadAndExit` event can only be processed once

* Fix `DelayedVisibility` not being displayed in previews
2025-10-30 08:39:06 +01:00
renovate[bot]
bb61126c96
fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.10.29 (#5625)
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.10.29

* Rename `NoPointer` to `NoHandle` for the Rust FFI fakes

* `@Ignore` tests broken by FFI direct mapping

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-10-29 22:56:03 +01:00
Jorge Martín
0d40a2fd79 Fix api breaks:
- `ComposerDraft` now takes a list of media attachments.
- `HumanQrLoginException` has a couple of new cases.
- `Client.loginWithQrCode` now returns a `LoginWithQrCodeHandle`, which we need to call using `scan` to have the same behaviour as before.
2025-10-28 17:14:40 +01:00
Benoit Marty
76493f52ec
Merge branch 'develop' into feature/bma/metro070 2025-10-23 11:30:25 +02: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
5b5c007cd2 Improve API of interface WellknownRetriever to be able to distinguish between 404 and other errors. 2025-10-22 15:28:31 +02:00
Jorge Martin Espinosa
5b1bfac6ff
Allow uploading notification push rules in bug reports (#5538)
* Allow uploading push rules in bug reports

* Improve bug report screen previews

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-10-15 11:45:04 +02:00
Benoit Marty
a5198b4f6a Fix API break on voice messages. 2025-10-13 17:12:34 +02:00
Benoit Marty
83c695d695 Fix API break in QrCodeLoginStep. 2025-10-13 15:52:06 +02:00
Benoit Marty
271ae19436 Remove useless Immutable annotation 2025-10-09 18:22:33 +02:00
Benoit Marty
9410a727b6 Rename RoomDirectoryList.State to RoomDirectoryList.SearchResult to avoid this class to be checked for stability. 2025-10-09 18:22:27 +02:00