Commit Graph

824 Commits

Author SHA1 Message Date
Benoit Marty d9fb0cf656 Pin user identity. 2024-10-07 22:19:13 +02:00
Benoit Marty c69e5f47e5 Render PinViolation above the composer. 2024-10-07 22:18:32 +02:00
Valere 041f1b4a06 crypto: Use OnlySigned isolation flag to setup decryption trust req. 2024-10-04 17:07:15 +02:00
Benoit Marty 05a6a3b3ce Merge pull request #3604 from element-hq/feature/bma/fixBuildWithLocalSdk
Fix building the app using a local SDK.
2024-10-04 15:02:25 +02:00
Valere 2230163bbe dep | Adapt rust-sdk, rename PreviouslyVerified to VerificationViolation 2024-10-04 12:37:33 +02:00
Benoit Marty 1e91e8b356 Fix building the app using a local SDK.
Inject `AnalyticsService` instead of `UtdTracker` since `UtdTracker` requires access to `org.matrix.rustcomponents.sdk.UnableToDecryptDelegate`
2024-10-04 12:01:30 +02:00
ganfra adc03c9676 timeline : improve jumpTo precision (introducing animateScrollToItemCenter) 2024-10-03 15:33:03 +02:00
ganfra 1e4c30c569 timeline : makes typingNotification item part of the timelineItems. 2024-10-03 13:14:14 +02:00
renovate[bot] 3001efb525 Update dependency org.matrix.rustcomponents:sdk-android to v0.2.50 (#3565)
* Adapt to changes in the SDK

* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.50

* Use lambda instead of overriding the `EventDebugInfoProvider` interface

* Fix test proposal.
We may find a better way to compare data class instance if we need to do more comparison in the future...

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-10-01 09:44:52 +02:00
Valere 10014d3936 rename invisible flag to onlySignedDeviceIsolation 2024-09-25 23:02:01 +02:00
ganfra db569cbcbe timeline : makes sure to emit empty list if initial reset has no item. 2024-09-25 15:50:11 +02:00
Benoit Marty 53fc2f3dfe Remove the no needed launch. 2024-09-24 21:29:25 +02:00
Benoit Marty b6fd46ece6 Add some missing runCatching to protect innerRoom access.
May fix https://sentry.tools.element.io/organizations/element/issues/533226/events/e22d3a80ab204ce392e65c989c2753ac/
2024-09-24 16:13:39 +02:00
Benoit Marty d14361760b No need to launch a coroutine to send the first value. 2024-09-24 16:01:58 +02:00
Benoit Marty 1309d04649 mxCallbackFlow already contains a tryOrNull wrapper around the block, so not need to add an extra one.
Also the block can return a non-null TaskHandle.
2024-09-24 15:59:48 +02:00
Jorge Martin Espinosa 16d5be3ed5 Fix pinned events banner reappearing when loading (#3519)
* Fix pinned events banner reappearing when loading.

Make the `RustTimelineItem.timelineItems` property a `SharedFlow` so we don't always incorrectly load an empty state by default.
2024-09-23 15:19:29 +02:00
Benoit Marty 6fa585f4c8 Add unit test on RustNotificationService
And fix mapping error.
2024-09-19 19:43:40 +02:00
Benoit Marty 8127aa6351 Cleanup constructor and avoid creating many mapper instances 2024-09-19 17:15:52 +02:00
Benoit Marty de7d93e37d Add test on RustRoomListService 2024-09-19 16:41:19 +02:00
Benoit Marty 1fd1f016be Add test on RoomListFactory 2024-09-19 16:23:39 +02:00
Benoit Marty b67c428793 Add test on RoomDirectorySearchProcessor
Give the responsibility to the RoomDirectorySearchProcessor to create the `MutableSharedFlow` since it requires a replayCache to work properly.
2024-09-19 16:04:31 +02:00
Benoit Marty a7d4babf48 Inject constructor 2024-09-19 15:16:19 +02:00
Benoit Marty 47df0d1e40 Add test on RustRoomDirectoryService 2024-09-19 12:47:53 +02:00
Benoit Marty 0e90e57444 Add test skeleton for RustMatrixClientFactory and RustMatrixAuthenticationService 2024-09-19 12:16:24 +02:00
Benoit Marty 96a2828de5 Change signature of RustMatrixClient, val are not always necessary. 2024-09-19 11:26:25 +02:00
Benoit Marty c8c79319eb Add first test on RustMatrixClient 2024-09-19 11:26:24 +02:00
Benoit Marty c510d1249d Merge pull request #3450 from element-hq/feature/bma/improveCoverageMetrics
Improve code coverage metrics
2024-09-19 10:02:55 +02:00
ganfra b364cee500 Room list : debounce subscribe to visible rooms. 2024-09-18 21:07:39 +02:00
Benoit Marty e9a898ff82 Cleanup 2024-09-18 18:08:11 +02:00
Benoit Marty 619841fc80 Add unit test on MatrixTimelineDiffProcessor 2024-09-18 17:16:06 +02:00
Benoit Marty 525186cb18 Exclude RoomListEntriesUpdate.describe() from coverage, it's only used to debug the app. 2024-09-18 17:16:06 +02:00
Benoit Marty 2d274a9b34 Add unit test on RoomDescriptionMapper 2024-09-18 17:16:06 +02:00
Benoit Marty 97f0b65c03 Change type of items in activeRoomCallParticipants from String to UserId 2024-09-18 17:16:06 +02:00
Benoit Marty 7903223585 Change type of items in alternativeAliases from String to RoomAlias 2024-09-18 17:16:06 +02:00
Benoit Marty 5b44eab444 Ensure mapping of Rust exceptions cover all cases. 2024-09-18 17:16:06 +02:00
Benoit Marty 25fd71cb2c Make sure Throwable.mapAuthenticationException() is exhaustive on mapping ClientBuildException and add test for full coverage. 2024-09-18 17:16:06 +02:00
Benoit Marty 30847e9e1f Add unit test on toAnalyticsJoinedRoom and fix a mapping issue. 2024-09-18 17:16:06 +02:00
Jorge Martin Espinosa d5ac6dabdf Fix sliding sync proxy login not working after native SS failure (#3489) 2024-09-18 17:02:49 +02:00
Benoit Marty 6b4cce7de3 Code cleanup 2024-09-18 14:14:10 +02:00
Jorge Martin Espinosa c08b8c0416 Make sure the logout action doesn't cause a crash (#3480)
* Make sure the logout doesn't cause a crash

Some reasons why this could happen:
1. The `ClientDelegate` could receive a `didReceiveAuthError` callback call on a logout, which could trigger another logout when every Rust object had already been destroyed.
2. Even though we stop the sync before logging out, `LoggedInFlowNode` will try to start it again automatically when it detects we still have internet connection.

Making sure to unregister the delegate should fix the first part of the issue.

For the other one, adding `RustSyncService.isServiceReady` to check if we should start/stop the service, which is enabled by default and set to false on destroy should help.

* Apply the same patch on account deactivation.

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-09-18 11:54:54 +00:00
Benoit Marty b87bec6228 Account deactivation. 2024-09-17 16:51:11 +02:00
Benoit Marty 3a0e182ba9 Use new API awaitRoomRemoteEcho to ensure that the room is ready SDK side. 2024-09-17 10:59:26 +02:00
Benoit Marty beb0bff3cc Use new API awaitRoomRemoteEcho to wait for the created room to be available. 2024-09-17 10:21:27 +02:00
Benoit Marty cf2c90ea0a Merge pull request #3467 from element-hq/feature/bma/accountCreation
Temporary account creation using Element Web.
2024-09-16 16:52:26 +02:00
ganfra 47d0c505b5 Merge pull request #3461 from element-hq/feature/fga/send_failure_identity_changes
Require acknowledgement to send to a verified user if their identity changed or if a device is unverified.
2024-09-16 16:00:18 +02:00
Jorge Martin Espinosa 7238af7f7f Fix not being able to decline an invite from the room list (#3466)
* Add `InvitedRoom` to wrap Rust SDK Rooms in 'invited' membership state.

At the moment, this is a wrapper that allows us to call `Room.leave()` without having to initialise the room's timeline (which is impossible).

* Add `MatrixRoom.getInvitedRoom(roomId)` to get one of these rooms.

Also, `RustRoomFactory` now has a `createInvitedRoom` method for this.

* Adapt `AcceptDeclineInvitePresenter` to use the new APIs.
2024-09-16 13:02:20 +00:00
Benoit Marty 39348d2e7e Account Creation using a WebView 2024-09-16 12:24:47 +02:00
Jorge Martin Espinosa 663362ac7f Add forced logout flow when the proxy is no longer available (#3458)
* Add `MatrixClient.isSlidingSyncProxySupported` function

* Update localazy strings

* Modify `ErrorDialog` to have an `onSubmit` call, which will be used for the submit action.

Also make the title text optional and dismissing the dialog by tapping outside/going back configurable.

* Check if a forced migration to SSS is needed because the proxy is no longer available.

In that case, display the non-dismissable dialog and force the user to log out after enabling SSS.

* Enable native/simplified sliding sync by default.

* Refactor the login to make sure we:

1. Always try native/simplified sliding sync login first, if available.
2. Then, if it wasn't available or failed with an sliding sync not supported error, try with the proxy instead (either discovered proxy or forced custom one).

* Move logic to `LoggedInPresenter` and the UI to `LoggedInView`

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-09-16 09:13:02 +00:00
ganfra b245c69322 Send failure verified user : set the room key recipient strategy 2024-09-13 16:41:44 +02:00
ganfra ff368b4072 Send failure verified user : resolve ui and logic 2024-09-13 16:40:07 +02:00