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
7 changes: 6 additions & 1 deletion apps/buzz-gpui/crates/app/src/ui/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,12 @@ impl ThreadPanel {
let weak = cx.entity().downgrade();
list.set_scroll_handler(move |event, _, cx| {
if event.visible_range.start < LOAD_OLDER_WITHIN && event.is_scrolled {
let _ = weak.update(cx, |this, _| this.load_older());
// GPUI runs this while it holds the list's state, and
// load_older reads and changes that state; run it after.
let weak = weak.clone();
cx.defer(move |cx| {
let _ = weak.update(cx, |this, _| this.load_older());
});
}
});
let tasks = vec![
Expand Down
Loading