We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 458bcb4 commit 60d722fCopy full SHA for 60d722f
1 file changed
src/window.vala
@@ -562,16 +562,18 @@ namespace Dc {
562
}
563
message_store.splice (0, message_store.get_n_items (), batch);
564
565
- Idle.add (() => {
566
- scroll_to_bottom ();
567
- Timeout.add (50, () => {
+ if (messages.length == 0) {
+ loading_chat = false;
+ scroll_down_btn.visible = !is_near_bottom ();
568
+ } else {
569
+ ulong scroll_handler_id = 0;
570
+ scroll_handler_id = message_scroll.vadjustment.notify["upper"].connect (() => {
571
scroll_to_bottom ();
572
loading_chat = false;
573
scroll_down_btn.visible = !is_near_bottom ();
- return Source.REMOVE;
574
+ SignalHandler.disconnect (message_scroll.vadjustment, scroll_handler_id);
575
});
- });
576
+ }
577
578
pinned.update_bar.begin ();
579
} catch (Error e) {
0 commit comments