third: Use Underscore throttle function instead of jQuery.

Since we already have _.js and it has this feature, there's no need
for a separate library.
This commit is contained in:
Aman Ghebreweldi
2018-05-16 14:42:42 -04:00
committed by Tim Abbott
parent add59ee48d
commit a781b89ec2
6 changed files with 7 additions and 264 deletions

View File

@@ -73,10 +73,10 @@ function scroll_finish() {
}
exports.initialize = function () {
message_viewport.message_pane.scroll($.throttle(50, function () {
message_viewport.message_pane.scroll(_.throttle(function () {
unread_ops.process_visible();
scroll_finish();
}));
}, 50));
};