Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions bindings/matrix-sdk-ffi/src/timeline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,7 @@ impl Timeline {
// Note we pass initial items as a reset update, as a way to give the callers a
// unified way to handle the initial batch of items as well as other
// batches, instead of having a separate callback for the initial items.
//
// Start with passing all the items of a *non-empty* timeline as a reset update
// (if the initial items are empty, then the timeline would transition
// from empty to empty, which is a no-op).
if !timeline_items.is_empty() {
listener
.on_update(vec![TimelineDiff::new(VectorDiff::Reset { values: timeline_items })]);
}
listener.on_update(vec![TimelineDiff::new(VectorDiff::Reset { values: timeline_items })]);

Arc::new(TaskHandle::new(get_runtime_handle().spawn(async move {
pin_mut!(timeline_stream);
Expand Down
Loading