mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 20:05:55 +00:00
only do article update operations once when scrolling
I discovered that DOM operations and function calls were done several times inside the 100px mirror when scrolling through articles. Especially painful on seamless scrolling systems like Mac OS, where dozens of updates would slow down this part dramatically. This change fixes it.
This commit is contained in:
@@ -1281,7 +1281,8 @@ function headlines_scroll_handler(e) {
|
|||||||
var child = rows[i];
|
var child = rows[i];
|
||||||
|
|
||||||
if ($("headlines-frame").scrollTop < child.offsetTop &&
|
if ($("headlines-frame").scrollTop < child.offsetTop &&
|
||||||
child.offsetTop - $("headlines-frame").scrollTop < 100) {
|
child.offsetTop - $("headlines-frame").scrollTop < 100 &&
|
||||||
|
child.id.replace("RROW-", "") != _active_article_id) {
|
||||||
|
|
||||||
if (_active_article_id) {
|
if (_active_article_id) {
|
||||||
var row = $("RROW-" + _active_article_id);
|
var row = $("RROW-" + _active_article_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user