Commit Graph

307 Commits

Author SHA1 Message Date
Jorge Martin Espinosa
2f4e266094 Fix crash when leaving room using LeaveRoomPresenter (#2498)
This happened because `roomInfoFlow` was shared eagerly and the `initial` part was called after the `Room` Rust object was destroyed.

I think there isn't a need for room info to be shared, it was a mistake I forgot to rollback.
2024-03-06 16:39:44 +00:00
Jorge Martin Espinosa
d8f9408cdb Room member moderation: kick, ban and unban (#2496)
* Room member moderation: kick, ban and unban

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-03-06 16:44:05 +01:00
Jorge Martin Espinosa
6a75be7bf0 Room admins can change user roles (#2423)
Allow Admins to modify room member roles:

- Add a 'roles and permissions' option for each room.
- Allow promoting users to admins, adding or removing moderators, and demote yourself if you're and admin.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-03-05 16:46:47 +00:00
Jorge Martin Espinosa
b64d7a267e Add extra params to bug reports (#2490)
* Add extra params to bug reports

- `local_time`: the time in the device's timezone.
- `utc_time`: the time in UTC.
- `sdk_sha`: the commit SHA that was used to build the Rust SDK
2024-03-05 17:21:47 +01:00
ganfra
26607761a1 RoomListFilters : use kotlin filtering as rust one is slower and has more chance to bust the room list cache. 2024-02-27 16:24:54 +01:00
Jorge Martin Espinosa
f0700f9904 Show blocked users list (#2437)
* Show blocked users list.

Also allow to unblock them from this list.

* Add non-blocking `AsyncIndicatorHost` component

* Use `StateFlow` for getting ignored users.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-02-26 15:24:22 +00:00
Benoit Marty
06caf35ff4 Make isLastSession "live" 2024-02-21 18:30:57 +01:00
Benoit Marty
4ed353aa56 Fix tests. 2024-02-21 18:30:08 +01:00
Jorge Martin Espinosa
c5dcd419ce Display banned users in room member list (#2415)
* Display banned users in room member list

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-02-20 10:07:06 +01:00
Benoit Marty
afec6370c1 Merge pull request #2413 from element-hq/feature/bma/unitTests
Add more unit tests
2024-02-19 16:15:28 +01:00
Jorge Martin Espinosa
87823fe8a4 Sort the room member list and display member roles (#2412)
* Sort the room member list and display member roles

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-02-19 15:03:36 +00:00
Benoit Marty
bedf3b9e3e Add test for RoomListEvents.DismissRecoveryKeyPrompt.
Also get the encryptionService from the matrixClient, instead of injecting it separately.
2024-02-19 13:36:08 +01:00
ganfra
85a0ef3677 RoomList : rework how search is done to prepare for later filtering 2024-02-16 19:35:03 +01:00
ganfra
e00311a739 Merge branch 'develop' into feature/fga/mark_room_as_favorite 2024-02-15 10:16:43 +01:00
ganfra
7e0e0f9ec4 read : use the new apis 2024-02-14 11:09:46 +01:00
ganfra
cc5355a049 Merge branch 'develop' into feature/fga/mark_room_as_favorite 2024-02-12 17:08:36 +01:00
Benoit Marty
7f5a63bf79 Merge pull request #2374 from element-hq/feature/bma/typingRendering
Typing notification rendering
2024-02-09 22:29:14 +01:00
ganfra
cf41a01bf0 Rust : fix tests for the new filter api 2024-02-08 21:03:18 +01:00
Benoit Marty
8496c736b6 Rendering typing notification #2242 2024-02-08 17:38:59 +01:00
Benoit Marty
12da93a926 Give 0 has default value for fixtures creators.
Also increases the readability of tests.
2024-02-08 11:34:54 +01:00
Benoit Marty
ca91b23512 Add ability mark as unread / mark as read a room. 2024-02-08 11:33:43 +01:00
ganfra
b70cbfeb63 Use the new setIsFavorite api 2024-02-06 16:04:44 +01:00
ganfra
7ca931c35f Favorite : rework and add tests 2024-02-02 14:54:28 +01:00
Jorge Martín
64a48a2abd Fix test fixtures 2024-02-01 12:19:25 +01:00
ganfra
a63d331f36 favorite : branch RoomNotableTags methods 2024-01-31 21:24:37 +01:00
renovate[bot]
f36d3cae89 Update dependency org.matrix.rustcomponents:sdk-android to v0.1.96 (#2323)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.1.96

* Fixes for the SDK upgrade

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2024-01-31 11:07:34 +00:00
Jorge Martin Espinosa
47f7f8952b Add missing device id to settings screen (#2320)
* Add missing device id to settings screen

* Extract footer component

* Restore `@PreviewWithLargeHeight` logic

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-31 10:01:17 +00:00
Jorge Martin Espinosa
38fdef0388 Fix crash about several DataStores using the same file (#2312)
* Fix crash about several DataStores using the same file

- Create `@SessionCoroutineScope` annotation to pass a session-managed coroutine scope to the DI.
- Expose this scope from `MatrixClient`.
- Rework DataStore file creation a bit.
- Centralise session preference creation through `DefaultSessionPreferencesStoreFactory` until we figure out what went wrong with the scoping
2024-01-30 11:10:46 +01:00
Benoit Marty
444954bad9 Merge pull request #2293 from element-hq/feature/bma/notificationCount
Iterate on notification badges
2024-01-30 10:33:17 +01:00
Benoit Marty
2ef8f67951 Send typing notification #2240 2024-01-26 16:30:43 +01:00
Jorge Martin Espinosa
17f22d143b Add 'send private read receipts' option in advanced settings (#2290)
* Add 'send private read receipts' option in advanced settings
* Create `SessionPreferencesStore` that stores the settings for the current use separate from those of the app.
* Rename `PreferencesStore` to `AppPreferencesStore` to split the preferences.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-26 10:06:26 +01:00
Benoit Marty
fe0e82b5d6 Map roomInfo.numUnreadNotifications to RoomSummaryDetails.numUnreadNotifications 2024-01-25 15:00:43 +01:00
Benoit Marty
f47b9827c5 Restore branch and git sha, to use it in logs and in rageshakes.
Remove quite useless `gitRevisionDate`.
2024-01-25 14:16:21 +01:00
Jorge Martin Espinosa
f9c5cd07a9 Return cached room members before fetching new ones, do it in batches (#2274)
* Use cached users from the Rust SDK.

Also lazy load received users by batches.

* Create `RoomMemberListFetcher` to wrap all the room member loading logic

* Ensure we clear `RoomMember` Rust references if the fetching coroutine is canceled
2024-01-23 18:23:20 +01:00
Benoit Marty
cdbfe8f92c Fix API break: use new methods canUserRedactOwn and canUserRedactOther. 2024-01-23 13:32:13 +01:00
Benoit Marty
ca1f907ec5 Use new Rust fields numUnreadMessages and numUnreadMentions, and iterate on the room badge rendering. 2024-01-22 15:48:46 +01:00
Benoit Marty
f42e220d55 Merge pull request #2130 from element-hq/feature/bma/roomListBadge
Some rework on the codebase
2024-01-22 10:17:38 +01:00
Jorge Martin Espinosa
854622b85f Make the room settings screen update automatically (#2197)
* Make the room settings screen update automatically
2024-01-19 17:34:06 +01:00
Benoit Marty
31b2c55bee Remove default value of RoomSummaryDetails constructor, and iterate on fixture functions. 2024-01-19 16:46:42 +01:00
Benoit Marty
82a3750cd8 Remove notificationMode to userDefinedNotificationMode to match SDK name. 2024-01-19 16:46:42 +01:00
Benoit Marty
371aec4427 Remove RoomSummaryDetails.lastMessageTimestamp and replace by a getter on lastMessage 2024-01-19 16:11:10 +01:00
Benoit Marty
0e57fbf352 Rename userAvatarURLString to userAvatarUrl 2024-01-19 15:59:50 +01:00
Benoit Marty
603b10264b Rename avatarURLString to avatarUrl 2024-01-19 15:58:37 +01:00
Benoit Marty
47a5c74129 Rename aRoomSummaryDetail to aRoomSummaryDetails 2024-01-19 15:55:26 +01:00
Benoit Marty
72a363c244 Fix moar ktlint issues 2024-01-11 11:24:10 +01:00
Benoit Marty
378692f743 Fix moar ktlint issues 2024-01-11 10:02:10 +01:00
renovate[bot]
7e9cda3aa9 Update plugin ktlint to v12.1.0 (#2200)
* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-10 16:22:24 +01:00
Benoit Marty
521d4a1983 Add missing test for SecureBackupEnablePresenter 2023-12-28 16:33:53 +01:00
Benoit Marty
e589b97fa5 Attempt to fix test on CI.
The test is failing on CI with this error:
expected instance of: io.element.android.libraries.architecture.Async$Success
but was instance of : io.element.android.libraries.architecture.Async$Loading
with value          : Loading(prevData=null)
2023-12-26 08:32:18 +01:00
Jorge Martín
b739cabbcd Revert "Merge pull request #2071 from element-hq/feature/bma/fixTests"
This reverts commit e49c73188d, reversing
changes made to ba04bbc5ca.
2023-12-22 12:01:42 +01:00