mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Wait for scroll before deciding whether to add scroll down button
FREEBIE
This commit is contained in:
@@ -278,9 +278,13 @@
|
||||
unreadEl.insertBefore(this.$('#' + oldestUnread.get('id')));
|
||||
var position = unreadEl[0].scrollIntoView(true);
|
||||
|
||||
if (this.view.bottomOffset > 0) {
|
||||
this.addScrollDownButtonWithCount(unreadCount);
|
||||
}
|
||||
// scrollIntoView is an async operation, but we have no way to listen for
|
||||
// completion of the resultant scroll.
|
||||
setTimeout(function() {
|
||||
if (this.view.bottomOffset > 0) {
|
||||
this.addScrollDownButtonWithCount(unreadCount);
|
||||
}
|
||||
}.bind(this), 1);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user