Commit Graph

49 Commits

Author SHA1 Message Date
Benoit Marty
629fc552e5 Use DependencyHandlerScope.testCommonDependencies() 2025-09-16 14:38:31 +02:00
Jorge Martín
e06bacbff3 Redo DI gradle setup code 2025-09-04 16:49:20 +02:00
Benoit Marty
2b42271615 Split module deeplink to api and impl. 2025-08-25 11:36:42 +02:00
Benoit Marty
9c32dbba58 Inject a StringProvider instead of the context, and update tests.
Also remove the other StringProvider we had, it was not used anymore
2025-08-13 11:07:28 +02:00
Benoit Marty
4192633930 Remove FeatureFlag.IncomingShare 2025-08-12 15:52:05 +02:00
Benoit Marty
2dec34374e Prevent users from using Element FOSS on homeservers that enforce the usage of Element Pro. 2025-08-06 10:23:16 +02:00
Benoit Marty
0b5e816f0d Cleanup testImplementation dependencies (#4790) 2025-06-02 10:51:02 +02:00
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
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
Jorge Martin Espinosa
4a43fcb69a Use Anvil KSP instead of the Square KAPT one (#3564)
* Use Anvil KSP instead of the Square KAPT one

* Fix several configuration cache, lint and test issues

* Allow incremental kotlin compilation in the CI

* Workaround Robolectric + Compose issue that caused `AppNotIdleException`

* Update the `enterprise` commit hash

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2024-10-02 11:52:17 +00:00
Jorge Martin Espinosa
2efdb3ae45 Centralise the DI code generation logic (#3562)
* Create Anvil extension helper

* Use the helper everywhere
2024-09-30 12:20:28 +00:00
Jorge Martin Espinosa
03786c1fd2 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
Benoit Marty
2b016227e9 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
Jorge Martín
d5c2e5e436 Extract OIDC to its own module 2024-08-13 08:55:05 +02:00
Benoit Marty
a83c5d4bd7 When clearing cache, ensure that SessionPreferencesStore is removed from the cache.
Fixes blank screen after clear cache.
Also cleanup the codebase.
2024-07-08 16:48:40 +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
3eaf780087 Add test on pusher registration 2024-06-17 11:30:22 +02:00
Benoit Marty
6781b5cee7 Add a flag to enable or disable incoming share 2024-06-06 12:34:05 +02:00
Benoit Marty
c403dcd5da Incoming share 2024-06-05 18:08:14 +02:00
Valere
c430699711 Add support for Verification state analytics 2024-05-06 19:06:54 +02:00
Benoit Marty
5ff74caed8 Create FakePushService. 2024-04-02 16:14:59 +02:00
Benoit Marty
4f8edce538 View Folders and files
Add test

Add test
2024-01-24 23:11:52 +01:00
Benoit Marty
b3ab4e0173 Add test for IntentResolver 2023-11-24 10:22:23 +01:00
Jorge Martin Espinosa
ee3d3ae213 Replace notification permission dialog with a screen (#1223)
* Replace notification permission dialog with a screen

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-09-05 18:58:05 +02:00
ganfra
226a3dbf28 Feature/fga/sync states (#1042)
* Change RoomSummaryDataSource to RoomListService to better reflects the rust api

* Better Sync management

* Sync: improve sync spinner rendering

* Sync: make test compiles

* Sync: add more test for sync spinner

* Sync: more clean-up

* Sync: pr review

---------

Co-authored-by: ganfra <francoisg@element.io>
2023-08-09 12:37:43 +00:00
Benoit Marty
1f243dcb54 Ensure uitest take preview from appnav module. 2023-07-19 14:41:41 +02:00
Jorge Martin Espinosa
280b7e32e0 Hide encryption history + FTUE flow (#839)
* First attempt at implementing encrypted history banner and removing old UTDs

* Get the right behavior in the timeline

* Implement the designs

* Extract post-processing logic, add tests

* Add encryption banner to timeline screenshots

* Create FTUE feature to handle welcome screen and analytics

* Move classes to their own packages, add tests for `DefaultFtueState`.

* Remove unnecessary private MutableStateFlow

* Move some FTUE related methods and classes back to the `impl` module

* Handle back press at each FTUE step

* Remove unneeded `TestScope` receiver for `createState` in tests.

* Use light & dark previews for the banner view.

* Move color customization from `TextStyle` to `Text` component.

* Rename `InfoList` design components, use them in `AnalyticsOptInView` too.

* Cleanup MatrixClient.

* Fix copy&paste error

Co-authored-by: Benoit Marty <benoit@matrix.org>

* Fix typo

* Fix Maestro tests

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2023-07-17 18:34:36 +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
Chris Smith
463b9e0642 Invite users to existing rooms (#441)
Invite users to existing rooms

Scope:

- Allow inviting from the room detail screen and the member list
- Invite option is only shown if the user has the correct power level
- Search flow the same as creating a new room, allowing multi-select
- Existing room members/invitees are disabled with a custom caption
- Sending is asynchronous, an error dialog will appear wherever the
  user is if necessary

Closes #245
2023-05-23 09:23:24 +00:00
Chris Smith
1d041578f7 Make danger check view changes (#391)
Make danger check view changes

Add a check that if a file with @Preview or @LargeHeightPreview
in it is changed, then the corresponding build file includes
the showkase processor.

Also change the check that prompts about screenshots to use
the same @Preview logic instead of checking for "/layout" in
the path which doesn't work with compose.

Also add missing showkase processors
2023-05-05 08:24:12 +00:00
Jorge Martin Espinosa
afd58f1634 Update Gradle to 8.1 and AGP to v8.0 (#329)
* Update AGP to 8.0.0.

* Set JAVA_HOME to JDK17

* Update lint version.

* Use right JDK for dependency analysis, replace deprecated env var.

* Upgrade to Gradle 8.1.

* Remove `@Supress(DSL_SCOPE_VIOLATION)` as it's no longer needed.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-17 08:49:52 +00:00
ganfra
7e25371bf2 Merge branch 'develop' into feature/fga/clean_up 2023-04-14 17:15:40 +02:00
ganfra
a166636060 Add some tests on RoomFlowNode 2023-04-14 15:34:41 +02:00
Benoit Marty
0874c076d6 Deeplink: handle notification click to open a room. 2023-04-13 15:35:01 +02:00
Benoit Marty
219b97eea7 Split push module into several modules: Firebase, UnifiedPush, store 2023-04-12 09:48:56 +02:00
Benoit Marty
c1f80cda80 Create LoggedIn presenter 2023-04-05 16:58:33 +02:00
Benoit Marty
500d4801a7 Add permission modules 2023-04-05 16:25:27 +02:00
Jorge Martin Espinosa
9064481b4c [Room Details] Leave room (#296)
* Add leave room functionality to the Room Details screen

* Add snackbar message throught `SnackbarDistpacher`
2023-04-05 15:36:41 +02:00
Jorge Martin Espinosa
0fb061fb2e [Room Details] Implement room details screen (#256)
* Implement Room Details screen

* Add option to create permalink from room id and alias, add share room action
2023-03-29 05:16:27 +00:00
ganfra
d60a653d83 Add utility methods for automatically including api/impl feature modules 2023-03-23 18:06:32 +01:00
Jorge Martin Espinosa
9639d62bb3 Add Session Verification flow (#197) 2023-03-17 10:07:19 +01:00
Benoit Marty
137e9b61f0 Introduce AppNavigationStateService. 2023-03-16 11:30:09 +01:00
Benoit Marty
6a34caf33d Create allFeatureApis extension and rename allFeatures to allFeaturesImpl 2023-03-09 14:52:40 +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
7051bfc14e [Architecture] split all feature modules to api/impl 2023-03-08 16:13:45 +01:00
ganfra
9d91fb06cc Merge branch 'develop' into feature/fga/improve_node_architecture 2023-03-07 12:10:20 +01:00
ganfra
5b16f8c4b0 [Architecture] : create appnav module so we can use only api feature modules 2023-03-06 20:30:48 +01:00