Commit 908a837b authored by Christopher Davis's avatar Christopher Davis Committed by Julian Sparber

room_history: re-enable kinetic scrolling after loading more

Previously kinetic scrolling was disabled while loading more
messages and was never re-enabled. This could lead to rooms
not scrolling with touch gestures.

Now after we add widgets to the top, we re-enable kinetic
scrolling for our ScrolledWindow.

Fixes #458
parent 2421ac1b
Pipeline #68183 passed with stages
in 24 minutes and 40 seconds
......@@ -52,6 +52,7 @@ impl List {
}
}
self.list.push_back(element);
self.view.set_kinetic_scrolling(true);
/* TODO: update the previous message:
* we need to update the previous row because it could be that we have to remove the header */
None
......
......@@ -255,6 +255,11 @@ impl ScrollWidget {
self.widgets.view.set_kinetic_scrolling(false);
self.balance.set(Some(Position::Top));
}
pub fn set_kinetic_scrolling(&self, enabled: bool) {
self.widgets.view.set_kinetic_scrolling(enabled);
}
pub fn get_listbox(&self) -> gtk::ListBox {
self.widgets.listbox.clone()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment