Ivan Enderlin
f13282ea30
fix: & without an explicit lifetime name cannot be used here.
...
This was previously accepted by the compiler but is being phased out;
it will become a hard error in a future release! See https://github.com/
rust-lang/rust/issues/115010.
2023-09-06 09:37:51 +02:00
Benjamin Bouvier
d6f0635023
chore: clippy + review feedback
2023-09-05 11:17:14 +02:00
Benjamin Bouvier
ea2826aac6
chore(FFI): update bindings for changes to the NotificationClient builder
2023-09-05 11:17:14 +02:00
Benjamin Bouvier
508091af80
feat: use the encryption sync permit from the SyncService in the NotificationClient
...
Also rejigger the parameters passed to the notification client builder, so that it's always required to pass
a process setup. With that, we're one step closer to removing the retry_decryption() function and enable it
by default.
2023-09-05 11:17:14 +02:00
Benjamin Bouvier
de9b6d25cd
feat: have the SyncService own the EncryptionSyncPermit and add try_get_encryption_sync_permit
2023-09-05 11:17:14 +02:00
Benjamin Bouvier
9469b77741
feat: add an EncryptionSyncPermit object allowing to use an EncryptionSync
...
The comment above the type should help understanding what it is about.
2023-09-05 11:17:14 +02:00
Jonas Platte
06ec19b50b
ui: Add test for transfering reply details
2023-09-05 10:39:48 +02:00
Jonas Platte
bd99c5e72b
ui: Transfer reply details from old to new item when receiving dup event
2023-09-05 10:39:48 +02:00
Jonas Platte
bdddb0ce7a
ui: Move reply test into a separate module
2023-09-05 10:39:48 +02:00
Jonas Platte
73a9cd40d3
sdk: Remove warning about event without txn ID
...
… it doesn't make sense to have as long as it's still very common to get
duplicate non-echo events from the SS proxy.
2023-09-05 10:39:48 +02:00
Ivan Enderlin
465c9bcbed
test(ui): Test Timeline is reset when a user is ignored/unignored.
2023-09-04 17:39:02 +02:00
Jonas Platte
4f2477fbe8
ui: Reset the timeline when ignore user list changes
2023-09-04 17:39:02 +02:00
Ivan Enderlin
cf419566e8
feat(ui): TimelineInnerStateLock::lock is replaced by ::read and ::write
...
feat(ui): `TimelineInnerStateLock::lock` is replaced by `::read` and `::write`
2023-09-04 15:44:13 +02:00
Damir Jelić
e835d9a1cc
The export_room_key method does not encrypt the room keys nor does it panic
2023-09-04 15:39:10 +02:00
Ivan Enderlin
91784ded72
feat(ui): TimelineInnerStateLock::lock is replaced by read and write.
...
The `Timeline` batches its updates to its subscribers (e.g. a client app,
like Element X). A batch is built every time the inner state lock of
the `Timeline` is released. On the paper, it's nice; in practise, even
a read operation on the `Timeline` leads to building a new batch. This
is inefficient and consumes resources (like CPU cycles, FFI boundary
crossings, memory allocations etc.) even if there is no update to put in
the batch: this will just batch empty updates.
To avoid that, one needs to make the difference between read or write
operations onto the inner state. Only the write operations will fire a
batch.
This patch splits the `TimelineInnerStateLock::lock` method into
`::read` and `::write`. The idea is that a read-only lock doesn't
hold a clone of the lock release observer (`lock_release_ob:
SharedObservable<()>`), it will not notify the observer. Then it's only
the write lock that holds a clone of the lock release observer, and will
notify it.
This patch updates the code accordingly as best as possible.
2023-09-04 15:05:52 +02:00
Benjamin Bouvier
e8e7738dfa
chore: introduce fail! macro to avoid repetitive work
2023-09-01 16:06:46 +02:00
Benjamin Bouvier
2d5f5879ab
chore: remove spurious clone
2023-09-01 16:06:46 +02:00
Benjamin Bouvier
0162e62feb
fix: don't save the latest_id_token upon refresh (thanks @zecakeh!)
2023-09-01 16:06:46 +02:00
Benjamin Bouvier
d37656d9f0
chore: use a hash() function instead of hashing manually
2023-09-01 16:06:46 +02:00
Benjamin Bouvier
5451d39ba3
chore: move notification within the refresh_access_token_inner function
2023-09-01 15:15:02 +02:00
Benjamin Bouvier
a17a7608f3
chore: add more focused logs for OIDC
2023-09-01 15:15:02 +02:00
Benjamin Bouvier
4cdef7255e
fix: save the OIDC refresh token from the response (!)
2023-09-01 15:15:02 +02:00
Jonas Platte
2b18a02488
ffi: Use avatar_url from sliding sync for RoomInfo where applicable
2023-09-01 10:47:48 +02:00
Jonas Platte
db565fcff3
ci: Improve caching for matrix-rust-components-swift and tarpaulin
2023-09-01 10:43:52 +02:00
Jonas Platte
e02676616f
sdk: Make use of clonable FnOnce in event handlers
2023-09-01 10:42:22 +02:00
Jonas Platte
a6b4e04181
sdk: Revert observable diff buffer capacity change
2023-09-01 10:06:07 +02:00
Benjamin Bouvier
d060ec2830
chore: add e2e-encryption cfg guards
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
51dcdac46d
TERRIBLE HACK: save the pos value in the crypto store
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
be3616c6b2
chore: rename restore_pos_from_database to share_pos
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
05a8343d03
chore: rename previous_pos to pos
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
28d25882c2
chore: fmt + clippy
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
5eb455032e
tests: add test and maintain property that in-memory pos == db pos at all times
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
6b84d03e2f
feat(encryption sync): restore the stream position from the database
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
08b9f0640c
feat: add a new sliding sync option to restore the stream position from the database
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
4b67a6608e
feat: persist previous pos when saving/restoring a sliding sync
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
941ecbfe0d
chore: refactor fields restored by restore_sliding_sync_state
2023-08-31 16:08:45 +02:00
Ivan Enderlin
719cbee96e
feat(ui): Fine-tuning RoomList again
...
feat(ui): Fine-tuning `RoomList` again
2023-08-31 12:57:27 +02:00
Benjamin Bouvier
11404010e6
chore: disable colors for logging in FFI for logcat and stdout too
2023-08-31 12:13:25 +02:00
Ivan Enderlin
4b04f15bc5
chore(ui): Naming is hard :-).
2023-08-31 12:04:14 +02:00
Doug
7e71c79072
chore(sdk): Log the OIDC refresh token (hashed). ( #2486 )
...
* chore(sdk): Log the OIDC refresh token (hashed).
* chore(sdk): Fix Clippy and PR comments.
2023-08-31 09:25:46 +00:00
Benjamin Bouvier
50a3da386e
feat: enable read receipts in the room list service sliding sync
2023-08-31 11:08:56 +02:00
Benjamin Bouvier
eebf271d6c
chore: use a workspace dependency for assert-json-diff
2023-08-31 10:34:46 +02:00
Benjamin Bouvier
4665277842
test(sliding sync): skipping b/o mode change doesn't change parameters in other lists
...
w
2023-08-31 10:34:46 +02:00
Ivan Enderlin
5a0c230a2d
feat(ui): visible_rooms can shrink its timeline_limit.
...
This patch updates the behavior of `visible_rooms` where its
`timeline_limit` is shrunk and expanded when the state machine is
recovering.
2023-08-31 10:31:44 +02:00
Ivan Enderlin
7819938149
feat(ui): invites is always defined in RoomListService.
...
This patch updates `RoomListService` to install the `invites` sliding
sync list from the start, along with `all_rooms`. Prior to the patch,
`invites` was installed after the first sync.
`invites` is installed in selective sync-mode with a range of `0..=0`.
After the next sync, `invites` switched its sync-mode to growing with a
batch size of `0..=19`.
2023-08-30 21:20:29 +02:00
Jonas Platte
06a19f016e
ffi: Only ever call ClientDelegate methods in a blocking task
...
… and clean up a few unnecessary Arc's.
2023-08-30 15:29:06 +02:00
Jonas Platte
5630851062
Upgrade Ruma
2023-08-30 15:22:00 +02:00
Ivan Enderlin
6b50a8988b
Merge pull request #2463 from matrix-org/jmartinesp/add-x86-64-workaround-to-crypto-sdk-in-main
...
Add the x86-64 Android workaround to the Crypto SDK too
2023-08-30 15:12:17 +02:00
Jonas Platte
1311ddbae3
ffi: Disable colorization of tracing fields
2023-08-30 14:07:22 +02:00
Ivan Enderlin
5564d323f5
fix(ui): Try to make RoomListService fast for gigantic accounts with various network speeds
...
fix(ui): Try to make `RoomListService` fast for gigantic accounts with various network speeds
2023-08-30 14:06:23 +02:00