Commit Graph

403 Commits

Author SHA1 Message Date
Benoit Marty
f20caebdcb Add support for login link (#4752)
* Add support for login link

https://mobile.element.io/element?account_provider=example.org&login_hint=mxid:@alice:example.org

* Update screenshots

* Reduce code duplication

* Add test on OnBoardingPresenter

* Fix tool

* Ignore login parameter if user is not allowed to connect to the provided server.

* Improve tests.

* Cleanup

* Revert change on Project.xml.

* Add documentation

* Improve LoginHelper

* Rename LoginFlow to LoginMode

Move LoginFlow to package io.element.android.features.login.impl.login
Rename some implementation of LoginMode
Rename LoginFlowView to LoginModeView

* Change launchMode of MainActivity from `singleTop` to `singleTask`

Using launchMode singleTask to avoid multiple instances of the Activity when the app is already open. This is important for incoming share and for opening the application from a mobile.element.io link.

Closes #4074

---------

Co-authored-by: ElementBot <android@element.io>
2025-05-21 18:19:42 +02:00
Benoit Marty
6995e62548 Merge on boarding module to login module (#4746)
* Move onboarding code to the login module.

* Remove OnBoardingEntryPoint, move the flow to LoginFlowNode

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-05-20 08:54:23 +02:00
ElementBot
90f89b9088 Sync Strings (#4739)
* Sync Strings from Localazy

* Sync strings again

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-05-19 08:17:02 +00:00
Benoit Marty
9ea4853e88 Improve the callback uri format and customization. (#4664)
* Remove unused SUPPORT_EMAIL_ADDRESS

* Improve the callback uri format and customization.

Use io.element.android for the scheme of Oidc redirection for Element X.
For nightly the scheme will be io.element.android.nightly
For debug the scheme will be  io.element.android.debug

Element Pro is using `io.element`
2025-05-05 17:46:17 +02:00
ganfra
c2568f84d2 Feature : Report room (#4654)
* feature (report room) : introduce all presentation classes.

* feature (report room) : branch entry point in the room list

* refactor (matrix ui) : move some code from appnav to matrix ui

* feature (report room) : add api on room

* feature (report room) : adjust ui

* feature (report room) : branch api

* feature (decline invite and block) : move things around and introduce presentation classes

* feature (decline invite and block) : continue to move things

* feature (report room) : remove reference to "conversation" for now

* feature (report room) : add report room action to room detail screen

* feature (report room) : enabled button state

* feature (report room) : improve code and reuse

* feature (report room) : add feature flag

* feature (report room) : change feature flag to static bool

* feature (report room) : add tests

* feature (report room) : fix ui with new api on ListItem

* feature (report room) : clean up and add more tests.

* Update screenshots

* feature (report room) : more test and fix issue

* feature (report room) : update strings

* feature (report room) : fix konsist preview

* feature (report room) : disable feature

* Update screenshots

* var -> val

* Improve preview of AcceptDeclineInviteView

* Improve preview consistency

* Add missing test on DismissErrorAndHideContent

* Update screenshots

* Add missing tests

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-05-02 12:25:19 +02:00
ElementBot
76c59e2eac Sync Strings from Localazy (#4648)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-04-28 10:59:35 +02:00
Jorge Martin Espinosa
c537e94146 Split MatrixRoom into BaseRoom and JoinedRoom (#4561)
`JoinedRoom` will now contain both a mandatory live timeline reference and all the functionality associated to it.

`BaseRoom` on the other hand will contain only functionality that's shared for both joined and not joined rooms.

`NotJoinedRoom` is a wrapper around `RoomPreviewInfo` data and a possible local `BaseRoom`, if it exists.

The `RustRoomFactory` cache is now gone since the persistent event cache should have the same effect.
2025-04-23 15:53:40 +02:00
Jorge Martin Espinosa
9a24906e88 Fix ringing calls not stopping when the other user cancels the call (#4613)
* Fix ringing calls not being automatically canceled

This will keep the sync active while the user is screening an incoming call, allowing receiving a call cancellation event, which will terminate the incoming call ringing early.

* Add extra logs to help debugging ringing call issues.
2025-04-22 11:30:10 +00:00
ElementBot
270b420575 Sync Strings (#4590)
* Sync Strings from Localazy

* Fix strings usage after some were moved

* Fix Norwegian string that was causing lint to fail

* Update screenshots

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-04-14 11:24:28 +02:00
Benoit Marty
a1d8322738 Introduce PushHistoryService to store data about the received push (#4573)
* Introduce PushHistoryService to store data about the received push

Add a push database.

* Update screenshots

* Improve preview.

* Update screenshots

* Add missing test.

* Add test for PushHistoryView

* Fix configuration issue.

Was: w: /libraries/troubleshoot/impl/src/test/kotlin/io/element/android/libraries/troubleshoot/impl/history/PushHistoryPresenterTest.kt:35:27 Cannot access class 'PushProvider' in the expression type. While it may work, this case indicates a configuration mistake and can lead to avoidable compilation errors, so it may be forbidden soon. Check your module classpath for missing or conflicting dependencies.

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-11 12:56:54 +02:00
Benoit Marty
77a7c0b2e5 Remember flows (#4533)
* Add Konsist test to ensure that the result of a function returning a flow is remembered.

* Remember flows before they are collected by state.

* Fix compilation issue

* Make isOnline a val.

* Make selectedUsers() a val.

* Make flow() a val.

* Make getUserConsent(), didAskUserConsent() and getAnalyticsId() some val.

* Remove Timeline.paginationStatus() and replace by direct access to the underlined flow.

* Simplify test

* userConsentFlow must be initialized before because it's used in observeUserConsent

* Fix test compilation
2025-04-04 16:50:43 +02:00
ganfra
042c0c5a6b Change (mention span) : rework and add more cases (#4476)
* change(mention span) : improve truncation logic

* change(mention span) : fix theme switching

* change(mention span) : start to pillify permalinks

* change(mention span) : use permalink directly

* change(mention span) : start improving mention type

* change(mention span) : use the appropriate MentionSpanProvider methods

* change(mention span) : introduce MentionSpanFormatter

* change(mention span) : introduce MentionSpanUpdater

* change(mention span) : Improve RoomNameCaches

* change(mention span) : remove useless param on HtmlConverterProvider

* change(mention span) : fix some remaining issues on the composer

* change(mention span) : remove pillifiedBody

* change(mention span) : fix some issues with pillification

* change(mention span) : fix getMentionsSpans

* change(mention span) : make sure all tests passes

* change(mention span) : remove the coroutine from the caches and a MentionSpanFormatterTest

* change(mention span) : add more tests on pillification

* change(mention span) : clean up

* Update screenshots

* change(mention span) : remove unexpected print

* change(mention span) : remove default values in constructor of TimelineTextBasedContent classes

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-03-28 11:20:32 +01:00
ElementBot
2f8b40777d Sync Strings (#4461)
* Sync Strings from Localazy

* Fix UI tests

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-03-24 16:45:24 +00:00
ElementBot
6dbb371ca2 Sync Strings from Localazy (#4421)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-03-17 09:54:03 +01:00
Jorge Martin Espinosa
6f8b1547ea Discard timed out user verification requests (#4385) 2025-03-10 18:38:38 +01:00
Jorge Martin Espinosa
b91933625c Implement user verification (#4294)
* Add support for starting verification of a user

* Add support for replying to incoming user verification requests

* Add reset recovery key button and previews to `ChooseSelfVerificationModeView`

* Add 'Profile' item in room details screen

* Update screenshots

* Remove `showDeviceVerifiedScreen` parameter from `NavTarget.UseAnotherDevice`

* Allow exiting the FTUE flow, which will close the app. The previous state will be restored when the app is reopened.

* When outgoing verification fails, move to the `Canceled` state. Then, when resetting the state machine state also reset the verification service.

---------

Co-authored-by: ElementBot <android@element.io>
2025-03-10 11:20:17 +01:00
Benoit Marty
b0be00aaa0 Sync strings (fix typo) 2025-03-10 10:26:50 +01:00
bmarty
9456ee921d Sync Strings from Localazy 2025-03-10 00:28:38 +00:00
ganfra
4ae92bc83e change(left room snackbar) : manage cancel knock and decline invite 2025-03-04 21:52:33 +01:00
ganfra
b6bd5fb97a Merge pull request #4348 from element-hq/feature/fga/move_room_directory_entry
change(room directory) : move the the room directory entry
2025-03-04 11:23:39 +01:00
ganfra
95ecbb7225 change(room directory) : move the the room directory entry from room list filter to start chat screen. 2025-03-04 10:56:16 +01:00
Benoit Marty
3a09d1c4ca Migrate to coil3 2025-03-03 12:30:26 +01:00
Benoit Marty
ec63866aa4 Merge pull request #4301 from element-hq/feature/bma/preloadAccountURL
Preload account urls
2025-02-26 15:54:20 +01:00
Jorge Martin Espinosa
274d9dc7c1 Upgrade SDK version to 25.02.26 (#4305)
* Upgrade SDK version to 25.02.26

* Remove OIDC URL result from logout, the SDK no longer provides it

* Handle room creation and destruction in a better way

* Remove `onSuccessLogout`
2025-02-26 09:04:49 +00:00
ganfra
e5ad0f6e5d feat(join by alias) : makes sure to pass server names 2025-02-25 15:55:42 +01:00
Benoit Marty
0e914ae1fb No need to invoke getOrNull. 2025-02-25 15:47:53 +01:00
ganfra
12c0465d2a feat(join by alias) : refactor navigation for create room flow 2025-02-25 15:45:42 +01:00
Benoit Marty
5b07a0acb1 Add tests. 2025-02-25 15:45:06 +01:00
Benoit Marty
1f7e281cfc Preload account management URL.
It will populate the SDK in-memory cache.
2025-02-25 15:11:12 +01:00
ElementBot
9733e79b60 Sync Strings from Localazy (#4298)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-02-24 09:14:29 +01:00
renovate[bot]
047e659719 fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25 (#4273)
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25

* Adapt to SDK changes:

- Remove logic related to sliding sync proxy, leaving just the minimum needed to detect its usage on the current session data.
- Remove code associated with the opt-in migration to native sliding sync, since it's now mandatory.
- Remove toggle between proxy/native sliding sync.
- Some fixes to session verification API breaks.

* Update forced logout dialog message, remove `NativeSlidingSyncMigrationBanner`

* Update screenshots

* Update all strings

* Remove `SuccessfulLogoutPendingAction`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <android@element.io>
2025-02-18 18:07:47 +01:00
Jorge Martin Espinosa
51f5087ef2 SyncOrchestrator: restore the initial sync step (#4242)
* SyncOrchestrator: restore the initial sync step

* Try having internal and public functions to be able to unit test the initial sync and the state changes separately, as well as the initial sync followed by a state change

* Only manually start sync if the `SyncService` was previously stopped, don't do it for `Offline` state
2025-02-18 12:50:59 +01:00
bmarty
3dddd90d97 Sync Strings from Localazy 2025-02-17 00:30:17 +00:00
Jorge Martin Espinosa
c040cec108 Create SyncOrchestrator (#4176)
* Create `SyncOrchestrator` to centralise the sync start/stop flow through the whole app: the decision is based on several inputs: sync state, network available, app in foreground, app in call, app needing to sync an event for a notification.

* Make network monitor return network connectivity status, not internet connectivity

* Don't stop the `SyncService` when network connection is lost, let it fail instead. This prevents an issue when using the offline mode of the SDK, which made the wrong UI states to be shown when the `SyncState` is `Idle` (that is, after the service being manually stopped).

* Rename `NetworkStatus.Online/Offline` to `Connected/Disconnected` so they're not easily mistaken with internet connectivity instead
2025-02-06 16:36:57 +01:00
Benoit Marty
c7a320d148 Create extension SyncService.isOnline() 2025-02-03 20:50:08 +01:00
Benoit Marty
0409ed84ed Enable Offline mode of the SyncService, so that the sync starts automatically when the network is back.
Also rely on the sync state to render the "Offline" banner.
2025-02-03 18:27:32 +01:00
bmarty
5a4cac7d2d Sync Strings from Localazy 2025-02-03 00:29:01 +00:00
Benoit Marty
9b0df915a6 Snackbar: SnackbarDispatcher.post does not need to be suspend. 2025-01-24 14:42:07 +01:00
ganfra
d5b5439db1 change(flow) : remove developer entry point from OnBoarding 2025-01-17 09:37:35 +01:00
bmarty
24fd0a3911 Sync Strings from Localazy 2025-01-13 00:30:35 +00:00
ganfra
78d4a8b2a0 Merge pull request #4105 from element-hq/feature/fga/send_queue_disabled
misc(send queue) : do not disable send queue when Network is Offline
2025-01-09 16:14:11 +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
ganfra
b3a0e2f9ea misc(send queue) : do not disable send queue when Network is Offline 2025-01-02 17:39:49 +01:00
Benoit Marty
538c7cc373 Merge pull request #4088 from element-hq/sync-localazy
Sync Strings
2024-12-30 10:18:33 +01:00
bmarty
7a57ec1cc1 Sync Strings from Localazy 2024-12-23 00:16:39 +00:00
Benoit Marty
7302a8392b Show more detail about the error when pusher registration fails. 2024-12-20 16:03:21 +01:00
Benoit Marty
4c63d892ac Start sync faster 2024-12-19 13:44:52 +01:00
Benoit Marty
acf7e4655b Always attempt to start the sync when starting the application. 2024-12-19 11:14:36 +01:00
ganfra
a66216f262 navigation : clear backstack when opening room from outer node 2024-12-02 21:46:32 +01:00
Benoit Marty
6d389bad9a Fix navigation issue when entering recovery key after navigating from the banner. 2024-11-27 17:11:30 +01:00