Commit Graph

573 Commits

Author SHA1 Message Date
Jorge Martin Espinosa
1e0891bb68 Implement MSC2530 (#2570)
* Implement MSC2530
* Some layout improvements for images and videos with captions
* Update screenshots
* Replace `it` in several previews with `isMine`

---------

Signed-off-by: Marco Antonio Alvarez <surakin@gmail.com>
Co-authored-by: Marco Antonio Alvarez <surakin@gmail.com>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-03-20 13:58:29 +01:00
Jorge Martín
f2d240c66d Fix SDK integration 2024-03-20 09:36:35 +01:00
Benoit Marty
62799e1854 Merge pull request #2565 from element-hq/feature/bma/userDataCache
Read user avatar from cache
2024-03-18 17:33:26 +01:00
Jorge Martin Espinosa
058a79127c Remove unnecessary Room.updateMembers() calls. (#2564)
* Remove unnecessary `updateMembers` calls.

Some of them can be directly removed since we have a way to automatically get member info updates based on membership changes.

Others can be replaced by a simpler `getUpdatedMember` method. This might still need a full member sync, but it's quite unlikely.
2024-03-18 14:57:25 +00:00
Benoit Marty
1144d467e5 Use client.cachedAvatarUrl(), to be able to render the user avatar faster, and even if there is no network (#2488). 2024-03-18 15:02:54 +01:00
Benoit Marty
a5940380c0 Merge pull request #2544 from element-hq/feature/bma/trackUtd
Track UTD errors.
2024-03-15 14:11:29 +01:00
Benoit Marty
55cbb99201 Improve UtdTracker test. 2024-03-15 12:33:54 +01:00
Benoit Marty
dce57a7234 Add unit test on UtdTracker 2024-03-15 12:29:38 +01:00
Benoit Marty
cf36ce3cec Improve crypto error content. 2024-03-15 09:41:43 +01:00
Benoit Marty
0702005468 Track UTD errors. 2024-03-14 17:03:50 +01:00
Jorge Martin Espinosa
a7093bae8b Add legacy call invite state events and notifications (#2552)
* Add state timeline events and notifications for legacy call invites

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-03-14 16:29:06 +01:00
Jorge Martin Espinosa
1670909408 Improve room member list loading UX (#2543)
Improve room member list UX:

- Don't display the list in chunks anymore.
- Use an indeterminate linear progress indicator to display some loading is being done (either loading the cached list or the updated one).
- Try to make sure we don't display the members loaded from timeline items as the cached room list by mistake.
* Update screenshots
* Simplify member loading logic.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-03-14 08:05:44 +00:00
Jorge Martin Espinosa
d19b3fe091 Change a room's permissions power levels (#2525)
* Change a room's permissions power levels

* Make `currentPermissions` use a `MatrixRoomPowerLevels?` instance instead.

* Update strings

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-03-12 15:45:06 +01:00
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
Timo Kösters
3386ee5178 Faster member list by avoiding many FFI calls (#2322)
* Faster member list by avoiding many FFI calls
2024-03-05 10:41:51 +01:00
renovate[bot]
209e89469b Update dependency org.matrix.rustcomponents:sdk-android to v0.2.6 (#2482)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.6

* Update SDK changes

* Fix tests

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2024-03-04 17:01:31 +00: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
9cace3c1de Log the fact that the application is using the global proxy. 2024-02-26 11:01:01 +01:00
Benoit Marty
a536ba583b Also log the filter value. 2024-02-26 10:21:13 +01:00
Benoit Marty
ec82072b4d Provide global proxy to the SDK 2024-02-23 11:49:35 +01:00
ganfra
0f563d712a Merge pull request #2422 from element-hq/feature/fga/room_list_filters
[Feature] Room list filters
2024-02-22 22:59:28 +01:00
Benoit Marty
4477328cf2 Merge pull request #2429 from element-hq/feature/bma/testRecoveryKey
Test recovery key
2024-02-22 17:37:11 +01:00
Benoit Marty
3d94310d02 Merge pull request #2432 from element-hq/renovate/org.matrix.rustcomponents-sdk-android-0.x
Update dependency org.matrix.rustcomponents:sdk-android to v0.2.4
2024-02-22 17:36:03 +01:00
Jorge Martín
1e6895ba80 Add null proxy parameter to RustAuthenticationService 2024-02-22 17:01:27 +01:00
Benoit Marty
236725dfb2 Merge try blocks. 2024-02-22 16:06:01 +01:00
Benoit Marty
d51430dfe4 Create extensions backupStateFlow() and recoveryStateFlow. 2024-02-22 12:37:44 +01:00
Benoit Marty
f29f46b9e9 Safer code, add some try catch blocks.
Filter out system alias before reading the keyStore entry.
use `size` instead of `count()`
Kotlin style.
2024-02-22 12:06:54 +01:00
ganfra
77ba3f905a Merge develop into feature/fga/room_list_filters 2024-02-22 11:15:43 +01:00
Benoit Marty
f1790c9a7a Move getAdditionalCertificates function to a dedicated class (no change in the implementation). 2024-02-22 11:09:55 +01:00
Benoit Marty
7efef9441b Merge pull request #2392 from poljar/poljar/user-certs
Add the user certificates as additional certificates to the ClientBuilder
2024-02-22 10:51:44 +01:00
Benoit Marty
229ee205d8 Use mxCallbackFlow 2024-02-22 09:11:08 +01:00
Benoit Marty
8d8cbab17e Force a refresh of the verification status when the recovery state value change.
The session can become verified when the user enters their recovery key, and in this case the callback `didFinish` is not invoked.
2024-02-21 18:30:57 +01:00
Benoit Marty
2381c0cdcd Keep references on TaskHandle, to avoid it to be garbage collected, and so the listeners are stopped. 2024-02-21 18:30:57 +01:00
Benoit Marty
06caf35ff4 Make isLastSession "live" 2024-02-21 18:30:57 +01:00
ganfra
3629a7a523 Merge develop into feature/fga/room_list_filters 2024-02-21 13:20:40 +01:00
Damir Jelić
237235c17e Add the user certificates as additional certificates to the ClientBuilder
Now, this is a story all about how
Certificates work in Android town
And I'd like to take a minute
Enter, close the door
I'll tell you how I've figured out the inner workings of the Keystore

Well it all boils down the fact that Google got scared
It said, "You're certs are movin' to a place you won't find".

So the directory, user certificates are stored, is hard to find, and possibly
not readable by your application[1]. Instead, we need to use the Keystore[2]
API, specifically we'll need to open the `AndroidCAStore` Keystore type.

The various Keystore types are supposedly documented[3], but I'm failing to
find a logical path that would lead you to conclude that:

    a) System certificates can or should be accessed using the Keystore,
       specifically the AndroidCAStore type
    b) User certificates can be found in the same Keystore type as the system
       certificates

So this was mostly found using random googling, swearing, and a couple of
educated guesses.

[1]: https://android-developers.googleblog.com/2016/07/changes-to-trusted-certificate.html
[2]: https://developer.android.com/reference/java/security/KeyStore
[3]: https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html#keystore-types
2024-02-21 13:18:11 +01:00
Jorge Martin Espinosa
e7ed466b4f Do not display empty room list state before the loading one (#2402)
* Do not display empty room list state before the loading one
2024-02-21 12:16:00 +01:00
ganfra
dd7c2cbf9a RoomListFilters : branch the logic 2024-02-20 11:17:15 +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
ganfra
2934682e57 rust sdk : fix api changes 2024-02-19 21:35:31 +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
ganfra
1c5f0389f7 RoomList : clean after PR review 2024-02-19 12:08:11 +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