Load more notifications when scrolling down

This commit is contained in:
Max Brunsfeld 2023-10-22 17:10:21 +02:00
parent 23400a5a70
commit 59adcc1744
6 changed files with 97 additions and 30 deletions

View file

@ -134,7 +134,7 @@ impl ChatPanel {
ListState::<Self>::new(0, Orientation::Bottom, 1000., move |this, ix, cx| {
this.render_message(ix, cx)
});
message_list.set_scroll_handler(|visible_range, this, cx| {
message_list.set_scroll_handler(|visible_range, _, this, cx| {
if visible_range.start < MESSAGE_LOADING_THRESHOLD {
this.load_more_messages(&LoadMoreMessages, cx);
}