Skip to content

Commit 0cfa07d

Browse files
committed
revert "only start with a timeline reset diff if the timeline isn't empty"
1 parent 82c24a8 commit 0cfa07d

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

  • bindings/matrix-sdk-ffi/src/timeline

bindings/matrix-sdk-ffi/src/timeline/mod.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,7 @@ impl Timeline {
286286
// Note we pass initial items as a reset update, as a way to give the callers a
287287
// unified way to handle the initial batch of items as well as other
288288
// batches, instead of having a separate callback for the initial items.
289-
//
290-
// Start with passing all the items of a *non-empty* timeline as a reset update
291-
// (if the initial items are empty, then the timeline would transition
292-
// from empty to empty, which is a no-op).
293-
if !timeline_items.is_empty() {
294-
listener
295-
.on_update(vec![TimelineDiff::new(VectorDiff::Reset { values: timeline_items })]);
296-
}
289+
listener.on_update(vec![TimelineDiff::new(VectorDiff::Reset { values: timeline_items })]);
297290

298291
Arc::new(TaskHandle::new(get_runtime_handle().spawn(async move {
299292
pin_mut!(timeline_stream);

0 commit comments

Comments
 (0)