Commit 65f9c8a0 authored by Florian Müllner's avatar Florian Müllner
Browse files

chatView: Animate auto-scrolling to bottom

Unless the user is reading the backlog or there are unread highlights,
we jump to the bottom of the view on arrival of new messages. While
the jump is usually a single line, animations generally give transitions
a more natural feel, so move the cursor instead which allows GTK+ to
animate the transition.
parent 8312ef33
......@@ -432,7 +432,8 @@ const ChatView = new Lang.Class({
let adj = this.widget.vadjustment;
if (adj.value == this._scrollBottom) {
if (this._nPending == 0) {
adj.value = adj.upper - adj.page_size;
Gtk.MovementStep.BUFFER_ENDS, 1, false);
} else {
let id = Object.keys(this._pending).sort(function(a, b) {
return a - b;
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