Commit Graph

20 Commits

Author SHA1 Message Date
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
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
Benoit Marty
94f38f1af5 Rework FakeMatrixRoom so that it contains only lambdas. (#3229)
* Upgrade lint to 8.7.0-alpha01

* FakeMatrixRoom: lambda everywhere

Fix test compilation issues
2024-07-22 10:39:48 +02:00
Jorge Martin Espinosa
bb47ff8f49 Unify the way we decide whether a room is a DM or a group room (#3100)
* Add centralised 'room is DM' check

Also add extension functions for `MatrixRoom` and `MatrixRoomInfo`.

* Use the centralised method and extension functions through the app, including:

- Room list.
- Room details screen.
- Invites.
- Notifications.

Replace most `isDirect` usages with `isDm`.

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-07-10 16:28:46 +00:00
Benoit Marty
80a03ecd4e Remove LeaveRoomPresenterImplModule and use ContributesBinding 2024-05-31 09:51:32 +02:00
Benoit Marty
9367f58216 Rename some class from Impl to Default 2024-05-31 09:47:27 +02:00
ganfra
8b80b2859f Room navigation : some clean up 2024-04-12 15:58:15 +02:00
ganfra
79c6385edb Room navigation : fix tests on invite after the refactoring 2024-04-11 16:50:09 +02:00
Jorge Martin Espinosa
64a18afc1b Replace 'leave room' text with 'leave conversation' for DMs (#2231)
* Replace 'leave room' text with 'leave conversation' for DMs

* Add `isDm` property to both `RoomSummary` and `RoomListRoomSummary`

* Remove redundant `leave_conversation_alert_subtitle_*` texts

* Fix maestro flow

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-16 15:49:44 +01:00
Benoit Marty
378692f743 Fix moar ktlint issues 2024-01-11 10:02:10 +01:00
Benoit Marty
0405683713 Konsist: add test Function which creates Presenter in test MUST be named 'createPresenterName', and fix existing issues 2023-10-10 17:31:04 +02:00
Marco Romano
b860bd30bd GRemove the @JvmField annotation whenever using WarmUpRule. 2023-09-13 15:19:26 +02:00
jonnyandrew
301e49c3a3 Reduce test flakiness by warming up molecule tests (#1226) 2023-09-06 10:08:21 +00:00
renovate[bot]
6d3b816bf5 Update dependency app.cash.molecule:molecule-runtime to v1 (#925)
* Update dependency app.cash.molecule:molecule-runtime to v1

* Replace `RecompositionClock` with `RecompositionMode`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2023-07-20 07:36:19 +02:00
ganfra
03b2cbb06f Room: remove bestName and use displayName instead of name where it makes sense 2023-07-05 12:01:51 +02:00
ganfra
79eef06995 Await room: first attempt to wait for a room to be ready 2023-07-04 18:19:06 +02:00
Benoit Marty
91d20e1b78 Enforce usage of TestScope.testScheduler 2023-06-12 19:49:56 +02:00
Chris Smith
b6e45c976f Use member count instead of counting members (#530)
Use member count instead of counting members

For the room details screen, use the member count as supplied by
matrix instead of waiting for the entire member list to be
retrieved and then manually adding up all the relevant users.

This removes the loading state of the member count, relying on
a spinner on the member list itself if the user actually wants
to see the members. (The performance of that will be improved
separately on the rust side in the future)

Closes #505
2023-06-06 10:40:17 +00:00
Marco Romano
993fec1b74 Enable one last ignored test for LeaveRoomPresenterImpl (#462)
Most of the tests in `LeaveRoomPresenterImplTest.kt` where using `UnconfinedTestDispatcher` which was conflating some of the state returned by the presenter. This prevented to test one specific case which had been left with an `@Ignore` annotation.
This PR switches to `StandardTestDispatcher` so that the ignored test case can work and also fixes some other test cases whose behavior is now more correct under the `StandardTestDispatcher`.

Also updates our test factory method for `CoroutineDispatchers` to more easily obtain a `CoroutineDispatchers` which uses `StandardTestDispatcher`.
2023-05-26 07:51:41 +02:00
Marco Romano
67a8802766 Room list contextual menu (#427)
- Adds `ModalBottomSheet` to our design components (it wraps the homonimous Material3 one).
- Adds  a bottom sheet to the Room list using the aforementioned design component.
- Adds navigation from the room list to a room detail (context menu "Settings" action).
- Consolidates the "leave room flow" into a new `leaveroom` module used by both the room list and the room details.
  - Adds progress indicator to the leave room flow
- Uses new `leaveroom` module in `roomdetails` module too. 

Parent issue:
- https://github.com/vector-im/element-x-android/issues/261
2023-05-25 06:42:44 +00:00