Commit Graph

6307 Commits

Author SHA1 Message Date
Ivan Enderlin
bae6fc71d0 test(ui): Add a test specifically for RoomList::invites. 2023-06-16 13:10:36 +02:00
Ivan Enderlin
7a1d59e9a2 feat(ffi): Implement RoomList::invites. 2023-06-16 12:43:36 +02:00
Ivan Enderlin
e09a44831b feat(ui): Implement RoomList::invites. 2023-06-16 12:43:12 +02:00
Ivan Enderlin
5d82d5db89 feat(ui): Add the invites list in the RoomList.
The `invites` list is added when the first rooms are loaded, so that it
doesn't slow the first initial start up.
2023-06-16 12:28:42 +02:00
Jonas Platte
db5c9d8c4b ffi: Add Room::get_timeline_event_content_by_event_id 2023-06-15 17:24:18 +02:00
Ivan Enderlin
ec1172c353 feat(ui+ffi): Implement RoomList::entries_loading_state
feat(ui+ffi): Implement `RoomList::entries_loading_state`
2023-06-15 17:20:42 +02:00
Ivan Enderlin
61d4850a66 chore: Make Clippy happy. 2023-06-15 16:18:08 +02:00
Ivan Enderlin
1f6a0b23f0 fix(ui): Set visible_rooms with a default range
fix(ui): Set `visible_rooms` with a default range
2023-06-15 16:08:17 +02:00
Ivan Enderlin
5673422831 test(ui): Use stream_assert to simplify the code. 2023-06-15 15:58:08 +02:00
Ivan Enderlin
d935f52c86 doc(sdk): Update documentation of SlidingSyncList::state_stream. 2023-06-15 15:53:06 +02:00
Ivan Enderlin
0ff9073a14 feat(ffi): Implement RoomList::entries_loading_state.
This patch implements `RoomList::entries_loading_state`.
2023-06-15 15:50:21 +02:00
Ivan Enderlin
a073c1422c test(ui): Test RoomList::entries_loading_state. 2023-06-15 15:45:30 +02:00
Ivan Enderlin
4e92738c28 feat(ui): Implement RoomList::entries_loading_state.
This patch implements `RoomList::entries_loading_state`, which
is a basic forwarding from the `all_rooms` sliding sync list'
`state_stream()` result.
2023-06-15 15:45:30 +02:00
Ivan Enderlin
db6798321c feat(sdk): SlidingSyncList::state_stream returns a tuple.
This patch updates `SlidingSyncList::state_stream` to return
a tuple `(SlidingSyncListLoadingState, impl Stream<Item =
SlidingSyncListLoadingState>)`.
2023-06-15 15:45:30 +02:00
Ivan Enderlin
f10f0d017d feat(sdk): Rename SlidingSyncState to SlidingSyncListLoadingState.
This patch renames `SlidingSyncState` to `SlidingSyncListLoadingState`
because:

1. It's about a list information,
2. It's about the loading state, not a generic state.
2023-06-15 15:45:28 +02:00
Ivan Enderlin
1c480398d2 fix(ui): Set visible_rooms with a default range.
The MSC3575 says that if no `ranges` for a list is provided, it defaults
to `0..=99`. We don't want that! This patch sets the default value to
`0..=19` for the `visible_rooms`.
2023-06-15 15:37:35 +02:00
Jonas Platte
52d2fa1a72 ffi: Clean up 2023-06-15 15:20:46 +02:00
Jonas Platte
12df1f38ed ffi: Remove remaining callback interfaces from UDL 2023-06-15 15:20:46 +02:00
Jonas Platte
899c0d59e6 ffi: Remove sliding sync things from UDL 2023-06-15 15:20:46 +02:00
Jonas Platte
867b3665d2 ffi: Remove re-exports from timeline module 2023-06-15 15:20:46 +02:00
Jonas Platte
daf59356cb ffi: Remove room list from UDL 2023-06-15 15:20:46 +02:00
Jonas Platte
53ae4362f6 ffi: Remove unused public Rust API 2023-06-15 15:20:46 +02:00
Jonas Platte
b789b9e063 ffi: Remove room / timeline things from UDL 2023-06-15 15:20:46 +02:00
Jonas Platte
b1c8859eb9 Upgrade UniFFI 2023-06-15 15:20:46 +02:00
Jonas Platte
0e618bea5c ui: Don't use TryFutureExt where not necessary 2023-06-15 14:37:40 +02:00
Ivan Enderlin
31d834048f feat(fii): Implement RoomList::apply_input
feat(fii): Implement `RoomList::apply_input`
2023-06-15 13:22:09 +02:00
Benjamin Bouvier
1fd039c64f sliding sync: lazily generate and include the transaction id, only if it's useful (#2063)
* feat: lazily generate and include the transaction id, only if it's useful
* chore: add a small `LazyTransactionId` wrapper that ensures it's only created once

---------

Signed-off-by: Benjamin Bouvier <public@benj.me>
2023-06-15 10:30:24 +00:00
Kévin Commaille
16a63d352c base: Remove the session field from StateChanges
It is never set nor used.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-15 11:12:40 +02:00
Ivan Enderlin
59565657fa feat(ffi): Implement RoomList::apply_input.
This patch implements `RoomList::apply_input`. Usage example:

```rust
room_list.apply_input(RoomListInput::Viewport { ranges: vec![RoomListRange { start: 10, end_inclusive: 20 }]}).await?;
```
2023-06-15 11:12:17 +02:00
Ivan Enderlin
ea9a85395a chore(ui): Add missing trailing commas. 2023-06-15 11:11:48 +02:00
Jonas Platte
78135fcce9 ffi: Add message_event_content_new 2023-06-15 10:44:40 +02:00
Jonas Platte
7feba6f814 ffi: Use Duration instead of u64
Resolves FIXME comment.
2023-06-15 10:44:40 +02:00
Ivan Enderlin
7756b6d725 feat(ui): Implement room subscriptions in RoomList + notification counts
feat(ui): Implement room subscriptions in `RoomList` + notification counts
2023-06-15 10:28:04 +02:00
Ivan Enderlin
c07bb0ec39 test(ui): Test that RoomList receives State updates even if the same.
`RoomList::state` provides a `Subscriber` to the `State`. This patch
modifies the way the state is tested, to ensure that there is always
an update broadcasted even if the state is the same (e.g. if the state
moves from `CarryOn` to `CarryOn`).
2023-06-15 09:55:57 +02:00
Ivan Enderlin
ddffa00589 test(ui): Test Room::*unread_notifications(). 2023-06-15 09:40:55 +02:00
Ivan Enderlin
6e1de8a5ee fix(ffi): RoomListItem::full_room returns a Room with a Timeline. 2023-06-15 09:26:33 +02:00
Ivan Enderlin
23d5655901 feat(ui): room_list::RoomInner holds Arc to Timeline.
This patch updates `RoomInner::timeline` and `::sneaky_timeline` to
`AsyncOnceCell<Arc<Timeline>>`. Adding `Arc` allows to copy the timeline
if necessary more easily.
2023-06-15 09:24:47 +02:00
Richard van der Hoff
6b45749e17 crypto-js: Add new methods to VerificationRequest (#2068)
A couple of useful methods for accessing things in `VerificationRequest`.
2023-06-14 15:46:36 +01:00
Jonas Platte
b4cd0c71bf ui: Add loading indicator before waiting for prev_batch token
… in Timeline::paginate_backwards.
2023-06-14 14:00:58 +02:00
Kévin Commaille
b4fdfee7f0 base: Use batch methods in Room::get_members
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Kévin Commaille
38fc1f7b15 base: Add method to construct RoomMember from parts
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Kévin Commaille
e32e9b5a22 base: Add state store method to fetch several display_names at once
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Kévin Commaille
7cba6d0849 base: Add state store method to fetch several presence events at once
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Kévin Commaille
b8abd1c022 base: Add state store method to fetch several profiles at once
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Kévin Commaille
4103d1b3e3 sdk: Add room method to fetch several state events at once
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Kévin Commaille
f740195eb6 base: Add state store method to fetch several state events at once
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Jonas Platte
ae4ead5550 Upgrade typos CI action
… and update the config file to reduce check flakiness.
2023-06-14 12:31:32 +02:00
Jonas Platte
820d3aff65 Rewrap base64 test strings 2023-06-14 12:31:32 +02:00
Jonas Platte
b3017a1073 Fix typos 2023-06-14 12:31:32 +02:00
Ivan Enderlin
b9c27b5c63 feat(ui): Implement Room::*unread_notifications. 2023-06-14 12:15:16 +02:00