You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just had a go at implementing the timeline API in my experimental rust-sdk on Web test jig (aurora). I'm seeing very strange behaviour, which maps onto reported bugs on Element X. If I use the API via:
letOk(ui_room) = room_list_service.room(&id).awaitelse{returnErr(Error::Other(anyhow!("couldn't get room")));};let builder = match ui_room.default_room_timeline_builder().await{Ok(builder) => builder,Err(err) => {returnErr(Error::Other(anyhow!("error when getting default timeline builder: {err}")));}};ifletErr(err) = ui_room.init_timeline_with_builder(builder).await{returnErr(Error::Other(anyhow!("error when creating default timeline: {err}")));}let(items, stream) = ui_room.timeline().unwrap().subscribe().await;// and then keep calling:let diff = stream.next().await.ok_or(anyhow!("no diffs"))?;
Then I get the following behaviour:
items returns an up-to-date array of date sep + the most recent ~6 items in the timeline, with unique_ids 0..6
diff then yields:
Clear (which deletes them all)
PushBack of the date sep (with unique_id 7)
PushBack of the most recent item in the timeline (with a new unique_id of 8, rather than 6 as it was before the clear)
then PushBacks of the previous 10 messages (meaning the timeline is now out of order), mixed with lots of Set as the items are gradually built up with RRs
then RemoveItem at index 1 to remove the out-of-order item
then PushBack to add it back (with unique_id 8) at the right point at the end.
We assign new unique_ids to the same items (probably not a disaster given we just Cleared the previous ones), but it's unsetlling to see the same items turning up with different ids.
We assign new unique_ids to the same items (probably not a disaster given we just Cleared the previous ones), but it's unsetlling to see the same items turning up with different ids.
I've checked this one because this shouldn't happen anymore. If it does, please provide a code example showing how to trigger it. The unique IDs are about to gain in importance with #4093, so we need them to be super-stable.
I just had a go at implementing the timeline API in my experimental rust-sdk on Web test jig (aurora). I'm seeing very strange behaviour, which maps onto reported bugs on Element X. If I use the API via:
Then I get the following behaviour:
items
returns an up-to-date array of date sep + the most recent ~6 items in the timeline, with unique_ids 0..6diff
then yields:Clear
(which deletes them all)PushBack
of the date sep (with unique_id 7)PushBack
of the most recent item in the timeline (with a new unique_id of 8, rather than 6 as it was before the clear)PushBack
s of the previous 10 messages (meaning the timeline is now out of order), mixed with lots ofSet
as the items are gradually built up with RRsRemoveItem
at index 1 to remove the out-of-order itemPushBack
to add it back (with unique_id 8) at the right point at the end.In other words, the bugs are:
items
). This is presumably the cause of Bubbles render incrementally, animating and exposing edits & mentions element-hq/element-x-ios#1895c.f. #1103 for known limitations of the timeline API, which doesn't look to include these.
The text was updated successfully, but these errors were encountered: