Benjamin Bouvier
743dec9a65
chore(docs): fix a doc comment referring to the wrong type
2025-07-02 15:47:59 +02:00
Ivan Enderlin
f1a2093cfc
fix(ui): Avoid calling TimelineEvent::raw() twice.
...
This patch replaces two successive calls to `TimelineEvent::raw()` by a
single one.
2025-07-02 15:45:29 +02:00
Ivan Enderlin
8057991aee
fix(sdk): Don't call event.raw() twice.
...
This patch replaces a second call to `event.raw()` by re-using the
`raw_event` variable.
2025-07-02 15:45:29 +02:00
Ivan Enderlin
d45ef567d4
test(sdk): Add a new test for RoomEventCache::rfind_event_in_memory_by.
2025-07-02 14:44:21 +02:00
Ivan Enderlin
42ee967b46
feat(sdk): Add RoomEventCache::rfind_event_in_memory_by.
...
This patch introduces a new method named
`RoomEventCache::rfind_event_in_memory_by` to look for an in-memory
event, starting from the most recent event, by applying a predicate
closure on each event.
2025-07-02 14:44:21 +02:00
Ivan Enderlin
4c7575bc9e
refactor(sdk): Rename RoomEventCache::event_with_relations to find_event_with_relations.
...
This patch renames the `RoomEventCache::event_with_relations` method to
`find_event_with_relations` for the sake of clarity, also to match the
other method names, and to match the Rust standard library namings.
2025-07-02 14:44:21 +02:00
Ivan Enderlin
5e927f8109
refactor(sdk): Rename RoomEventCache::event to RoomEventCache::find_event.
...
This patch renames the `RoomEventCache::event` method to `find_event` to
clarify what it does, and to match the Rust standard library namings.
2025-07-02 14:44:21 +02:00
Ivan Enderlin
f91ee36245
doc(sdk): Fix a typo in the documentation.
2025-07-02 14:44:21 +02:00
Benjamin Bouvier
0f8fc53019
chore(ci): use the dev profile when building the swift bindings ( #5328 )
...
The swift bindings aren't getting tested (they don't run) in CI anymore,
so building with the reldbg profile (that's a workaround to make it run
and not crash in production) doesn't provide more value than building in
debug mode, while taking much longer to build.
Let's use the default dev profile for this; we have to specify it
manually, because the default for the xtask command is to use the
`reldbg` profile otherwise.
This requires a fix for the dev profile, that consists in being able to
set the iOS deployment target, and set it to a high value in CI
settings. Production builds *don't* have to set it, though.
2025-07-02 14:20:53 +02:00
Benjamin Bouvier
be3af5e0d4
refactor(event cache): push down absence of gap handling in back-paginations
...
This will be useful to do for threaded paginations too.
2025-07-02 12:43:42 +02:00
Benjamin Bouvier
38bbdf0547
doc(event cache): tweak outdated comment
2025-07-02 12:43:42 +02:00
Benjamin Bouvier
b188a157af
refactor(event cache): inline most uses of EventLinkedChunk::push_events
...
The only remaining uses outside the `EventLinkedChunk` are in tests of
deduplication, so keep the method as a test-only method for now.
2025-07-02 12:43:42 +02:00
Benjamin Bouvier
9ccbac0c0e
refactor(event cache): inline and remove from public API remove_empty_chunk_at
2025-07-02 12:43:42 +02:00
Benjamin Bouvier
137fc9cfbb
refactor(event cache): remove EventLinkedChunk::push_gap from the public API
...
it's only used internally (and in tests), and it's not doing much, so we
can inline it as call sites instead.
2025-07-02 12:43:42 +02:00
Benjamin Bouvier
40a4c9a7e1
refactor(event cache): move pushing the live events into its own method in EventLinkedChunk
2025-07-02 12:43:42 +02:00
Benjamin Bouvier
ad358955fd
refactor(linked chunk): simplify remove_item_at
2025-07-02 12:43:42 +02:00
Benjamin Bouvier
0ee89c86ab
refactor(event cache): remove methods that are plain private wrappers
...
These two methods could be only made private now, since they're only
used in `finish_back_pagination` (and in tests). But they only call
inside other methods of the underlying linked chunk without any extra
value, so they can be inlined instead. This reduces the public API and
removes tests for other APIs that were tested some place else.
2025-07-02 12:43:42 +02:00
Benjamin Bouvier
216f0df945
refactor(linked chunk): invert the position of insert_items_at parameters
...
Same logic as `replace_gap_at`.
2025-07-02 12:43:42 +02:00
Benjamin Bouvier
129e9e173e
refactor(event cache): move finishing a network paginations in a EventLinkedChunk method
2025-07-02 12:43:42 +02:00
Benjamin Bouvier
f7df0ebf97
refactor(event cache): change order of parameters in replace_gap
...
"Replace *this* gap with *these* events" read more natural to me than
"replace with *these* events *this* gap".
2025-07-02 12:43:42 +02:00
Benjamin Bouvier
2f78701374
refactor(event cache): move order of parameters in filter_duplicate_events
2025-07-02 12:43:42 +02:00
Benjamin Bouvier
872bded711
refactor(event cache): rename room_event names to linked_chunk or room_linked_chunk where it makes sense
2025-07-02 12:43:42 +02:00
Benjamin Bouvier
5196298e5f
refactor(event cache): rename RoomEvents to EventLinkedChunk
2025-07-02 12:43:42 +02:00
Johannes Marbach
308526a6bc
feat(ffi): expose timestamp and identifier on EmbeddedEventDetails
...
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org >
2025-07-02 12:38:53 +02:00
Johannes Marbach
12f94a3fd2
feat(ui): expose timestamp and identifier on EmbeddedEvent
...
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org >
2025-07-02 12:38:53 +02:00
Benjamin Bouvier
3c873262c7
fix(event cache): disable order assertions entirely
...
Until we figure out some panics in production this has caused.
matrix-sdk-ffi/20250702
2025-07-02 12:18:29 +02:00
Benjamin Bouvier
9689c4a40a
feat(ffi): add a new log pack for the notification client
2025-07-02 10:52:55 +02:00
Benjamin Bouvier
57e7ae488e
chore(ui): tweak the notification client logs
2025-07-02 10:52:55 +02:00
Jade Ellis
a9ffe5fd72
chore: Update rusqlite
2025-07-01 21:25:15 +02:00
Damir Jelić
59c29801e5
refactor: Remove some useless cfg guards
...
The whole module is behind a e2e-encryption feature guard, so those
individual ones in the module are not useful.
matrix-sdk-ffi/20250701
2025-07-01 14:32:53 +02:00
Ivan Enderlin
0a822c1a06
fix(sdk): EventCache::for_room returns an error when room isn't found.
...
This patch fixes `EventCache::for_room` to return an error when the room
isn't found. Additionally, it also returns an error when the `Client`
(actually the `WeakClient`) is dropped.
These errors were “hidden” behind the room version logic because of
the fallback. The code has been rewritten in a way it makes it harder to
do it again.
2025-07-01 14:31:01 +02:00
Valere Fedronic
4b5e1c6676
feat(widget): Add support for the widget to send encrypted to-device messages
...
This patch adds support for widgets to send encrypted to-device messages as described in MSC3819.
MSC3819: https://github.com/matrix-org/matrix-spec-proposals/pull/3819
2025-07-01 14:13:31 +02:00
Benjamin Bouvier
ecb9d4d2e8
refactor(timeline): remove fields from TimelineFocusKind that are used only to init the focus
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
9ade32fcd0
refactor(timeline): remove generic from a few function signatures by using plain bools
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
8b4a01ea54
refactor(timeline): pass TimelineSettings immediately when creating a Timeline
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
d5d5b9ee01
refactor(timeline): move the crypto tasks spawning to decryption_retry_task too
...
This will make it easier to move all the code around, when needs be.
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
a3dd594c9e
refactor(timeline): move the crypto drop handles to their own data structure
...
And put it in the `decryption_retry_task`, so it can be moved
altogether, later, to the event cache or some place else.
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
98c331466e
doc(timeline): beef up comments for the long-lived tasks
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
e8877fd987
refactor(timeline): move long-lived tasks to a new tasks mod
...
Only code motion.
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
babf16f15a
refactor(timeline): use the num_events parameter for a thread back-pagination
...
And not the initial `num_events` parameter used for the initial
pagination.
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
000419cdf3
refactor(timeline): rename TimelineFocusData to TimelineFocusKind
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
89d661ca8c
refactor(timeline): get rid of TimelineFocusKind \o/
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
1624d798ee
refactor(timeline): replace remaining uses of TimelineFocusKind with TimelineFocusData
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
726218000a
refactor(timeline): add TimelineFocusKind's fields to TimelineFocusData
...
This will make it possible to get rid of `TimelineFocusKind`!
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
08dcb267b3
refactor(timeline): use the TimelineFocusData when processing relations
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
da0a32b088
refactor(timeline): use the TimelineFocusData to update the skip count
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
e22a833057
refactor(timeline): add a TimelineFocusData to TimelineState and TimelineStateTransaction
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
8aba664578
refactor(timeline): get rid of internal locking for TimelineFocusData
...
Turns out it's not needed, because all the internal data structures
already use inner mutability patterns.
2025-07-01 14:06:57 +02:00
Benjamin Bouvier
e117a3d22f
fix(sdk): use a cfg guard instead of if cfg! to avoid build failures on !test && !debug_assertions builds
2025-07-01 12:11:09 +02:00
Andy Balaam
c2f50fd8a5
doc(crypto): Attempt to explain what handle_to_device_event does and make all types explicit
2025-07-01 11:25:03 +02:00