Commit Graph

13223 Commits

Author SHA1 Message Date
Ivan Enderlin b2cc279279 feat(ui): Change all_rooms to timeline_limit=0.
When a user has hundreds of rooms, `RoomListService` will fetch at worst
one event per room, which can generate large responses. Let's use a
`timeline_limit=0`.
2023-08-28 14:50:55 +02:00
aringenbach 8cb00510d2 ffi: use RoomMessageEventContentWithoutRelation for send / reply / edit 2023-08-28 11:26:51 +02:00
Nicolas Mauri 63196aa6aa fix(sdk): limit the number of retries when updating push rules. (#2461)
* fix(sdk): limit the number of retries when updating push rules.
* fix Rust format
2023-08-25 15:11:49 +00:00
Jorge Martín e7ad46f5a0 Fix formatting 2023-08-25 14:37:09 +02:00
Jonas Platte 2311edecf6 ui: Remove unused import 2023-08-25 14:14:56 +02:00
Jonas Platte aed9b20195 Silence clippy lint arc_with_non_send_sync on wasm 2023-08-25 14:14:56 +02:00
Jorge Martín 1d08ffa05e Add the x86-64 Android workaround to the Crypto SDK too 2023-08-25 13:31:12 +02:00
Jonas Platte e02aa6b132 ffi: Add Room::{room_info, subscribe_to_room_info_updates} 2023-08-25 11:39:57 +02:00
Jonas Platte 9a0869dff8 base: Add Room::subscribe_info 2023-08-25 11:39:57 +02:00
Jonas Platte 72b11d5cc6 sdk: Replace Arc<RwLock<_>> around RoomInfo with SharedObservable 2023-08-25 11:39:57 +02:00
Ivan Enderlin 8f754a4f05 fix(base): BaseClient::ignore_user_list_changes is no longer behind an Arc
fix(base): `BaseClient::ignore_user_list_changes` is no longer behind an `Arc`
2023-08-24 15:17:14 +02:00
Jonas Platte 320f5c2155 Rename feature flag for widgets 2023-08-24 14:55:55 +02:00
Jonas Platte 1c3dd38b97 ffi: Add widget API skeleton 2023-08-24 14:55:55 +02:00
Ivan Enderlin 0c21827a5a fix(base): BaseClient::ignore_user_list_changes is no longer behind an Arc.
This patch first off renames `BaseClient::ignore_user_list_changes_tx`
to `::ignore_user_list_changes`.

This patch then changes the type from `Arc<SharedObservable<_>>` to
simply `SharedObservable` as this type implement `Clone`. We basically
have a double-`Arc` here.

Finally, this patch adds documentation for this field.
2023-08-24 14:54:40 +02:00
Jonas Platte 7aa6981e37 Make update_timeline_item macro compatible with Rust 1.70
… by swapping the branches around. Previously, invocations meant to
match the found + not_found branch were actually hitting the other one
prior to Rust 1.71, likely due to parser supporting type ascription
(even though it was an unstable feature).
2023-08-24 13:42:44 +02:00
Ivan Enderlin c742affa13 feat(ui): Reduce and refresh the batch_size growing sync-mode of invites in RoomListService
feat(ui): Reduce and refresh the `batch_size` growing sync-mode of `invites` in `RoomListService`
2023-08-24 13:32:29 +02:00
Ivan Enderlin 55e8f2573b feat(ui): Add the ResetInvitesListGrowingSyncMode action in RoomList.
Inside `RoomListService`, the `State` enum handles the transition from
one state to another. In case of some `State::Error`, the `all_rooms`
sliding sync was refreshed, i.e. its sync-mode was reset to its initial
value.

This patch also refreshes the `invites` sliding sync list! It adds
the `ResetInvitesListGrowingSyncMode` action, and attaches it to the
`refresh_lists` actions.

New constants are added to represent default `batch_size` values for the
growing sync-mode for various sliding sync list. It could be helpful for
further maintenance.

This patch finally adds and updates the tests accordingly.
2023-08-24 13:07:28 +02:00
Ivan Enderlin e82607c743 chore(cargo) Update ruma
chore(cargo) Update `ruma`
2023-08-24 12:41:56 +02:00
Jonas Platte aac6294755 Rename test modules to tests
… for consistency.
2023-08-24 12:28:34 +02:00
Jonas Platte 3c8a59a43a Remove module::* imports 2023-08-24 12:28:34 +02:00
Ivan Enderlin 4e25a8c3c1 chore(cargo): Update ruma. 2023-08-24 12:17:40 +02:00
Ivan Enderlin 3dbc00cd67 feat(ui): Reduce the batch_size of invites in RoomListService.
This patch changes the `batch_size` of the sliding sync list `invites`
for `RoomListService`. Previous value was 100, new value is 20.

For accounts that have a large number of invites, it won't slow the
rendering of `visible_rooms`.
2023-08-24 10:36:04 +02:00
Marco Romano b2a1e3d268 Bump ruma 2023-08-24 07:37:10 +00:00
Jonas Platte 8deb0ff2e1 base: Handle redactions if e2ee is disabled 2023-08-23 17:20:26 +02:00
Jonas Platte 2fb6bdc24c Fix more clippy lints 2023-08-23 17:20:11 +02:00
Jonas Platte 24d2ccd5f0 base: Make BaseRoomInfo::handle_redaction private
It should only be called from RoomInfo::handle_redaction.
2023-08-23 17:19:51 +02:00
Jonas Platte 9fc5a7dc92 base: Add some logging for handle_redaction 2023-08-23 17:19:51 +02:00
Daniel Abramov 6ecd640ad7 Widget API: Initial skeleton 2023-08-23 15:08:51 +00:00
Marco Romano 3bc7b9136e ui: Add support for polls in timeline 2023-08-23 12:57:52 +00:00
Ivan Enderlin 4dbb0a7cc7 fix(ui): Tweak State of RoomListService when session is forced to expire
fix(ui): Tweak `State` of `RoomListService` when session is forced to expire
2023-08-23 13:28:08 +02:00
Ivan Enderlin 2dd1caaeab doc(sdk,ui): Fix typos. 2023-08-23 13:07:24 +02:00
Ivan Enderlin 6736a4a05f Update crates/matrix-sdk-ui/src/room_list_service/mod.rs
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2023-08-23 13:05:21 +02:00
Ivan Enderlin 8c234f0d0d test(ui): Test that RoomList::expire_sync_session ends up in Error. 2023-08-23 12:13:54 +02:00
Jonas Platte 4df1ee140a Fix clippy lints 2023-08-23 11:36:21 +02:00
Ivan Enderlin 0dacf6edc3 fix(ui): Tweak State of RoomList when session is forced to expire.
Usually, when the sliding sync session expires, it leads the state to
be `Error`, thus some actions (like refreshing the lists) are executed.
However, if the sync-loop has been stopped manually, the state is
`Terminated`, and when the session is forced to expire, the state
remains `Terminated`, thus the actions aren't executed as expected.
Consequently, this patch updates the state to `Error` manually.
2023-08-23 11:24:01 +02:00
Ivan Enderlin 5b28e641c4 Merge pull request #2441 from matrix-org/dependabot/cargo/rustls-webpki-0.101.4
chore(deps): bump rustls-webpki from 0.101.2 to 0.101.4
2023-08-23 09:17:11 +02:00
dependabot[bot] 9bf214925c chore(deps): bump rustls-webpki from 0.101.2 to 0.101.4
Bumps [rustls-webpki](https://github.com/rustls/webpki) from 0.101.2 to 0.101.4.
- [Release notes](https://github.com/rustls/webpki/releases)
- [Commits](https://github.com/rustls/webpki/compare/v/0.101.2...v/0.101.4)

---
updated-dependencies:
- dependency-name: rustls-webpki
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-22 18:10:40 +00:00
Jonas Platte 0d24bcf6e5 Revert "bindings: Use new uniffi-bindgen build mode"
This reverts commit 329b6c4eb1.
2023-08-22 18:40:20 +02:00
Kévin Commaille e01421a3dd Upgrade Ruma
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-08-22 17:25:02 +02:00
Jonas Platte 329b6c4eb1 bindings: Use new uniffi-bindgen build mode 2023-08-22 11:12:55 +02:00
Jonas Platte ef0549b8b8 xtask: Use camino path types 2023-08-22 11:12:55 +02:00
Doug 60392c299d bindings: Add OIDC support to AuthenticationService
- Use OIDC for logout when appropriate.
- Allow server's that support OIDC but not passwords to work.
- Only sign out users if token refresh is explicitly refused.
- Expose the OIDC account URL.
- Support for RP initiated logout.
2023-08-22 09:06:32 +00:00
Benjamin Bouvier 4493cbf0ac chore: rework Room::sync_up so it's really async 2023-08-21 19:36:33 +02:00
Benjamin Bouvier b7e18352c4 fix: read RoomInfo data at the very last minute before saving it
Also take ownership of the sync lock in write mode, since this operation could run concurrently
to room_joined/room_left events.
2023-08-21 19:36:33 +02:00
Benjamin Bouvier 936b6980c9 chore: move SyncTokenAwareClient to the common test helpers 2023-08-21 19:36:33 +02:00
Benjamin Bouvier e262db3505 test: write an integration test for missing keys during encryption 2023-08-21 19:36:33 +02:00
Benjamin Bouvier 0d67d14201 feat: query keys for newly sync'd members when sending encrypted message 2023-08-21 19:36:33 +02:00
Jonas Platte 78ad6a6530 ui: Remove JSON on RemotEventTimelineItem when it's redacted locally 2023-08-21 15:54:25 +02:00
Jonas Platte a5a541ec98 ui: Improve comment in redaction code
(move it to a more logical place)
2023-08-21 15:54:25 +02:00
Jonas Platte d395648165 ui: Remove outdated comment
The relevant decryption work is already done in a separate async task,
spawned in `TimelineInner::retry_event_decryption_inner`.
2023-08-21 15:00:00 +02:00