mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 20:35:54 +08:00
Merge pull request '[common] Fix bug 49094' (#856) from fix/bug-49094 into develop
This commit is contained in:
@ -712,7 +712,7 @@ define([
|
||||
if (model) {
|
||||
this.collection.remove(model);
|
||||
if (!silentUpdate) {
|
||||
this.updateComments(true);
|
||||
this.updateComments(true, undefined, undefined, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1089,16 +1089,18 @@ define([
|
||||
|
||||
// internal
|
||||
|
||||
updateComments: function (needRender, disableSort, loadText) {
|
||||
updateComments: function (needRender, disableSort, loadText, isSaveScrollPos) {
|
||||
var me = this;
|
||||
me.updateCommentsTime = new Date();
|
||||
me.disableSort = !!disableSort;
|
||||
if (me.timerUpdateComments===undefined)
|
||||
me.timerUpdateComments = setInterval(function(){
|
||||
if ((new Date()) - me.updateCommentsTime>100) {
|
||||
const scrollPos = me.view.commentsView.scroller.getScrollTop();
|
||||
clearInterval(me.timerUpdateComments);
|
||||
me.timerUpdateComments = undefined;
|
||||
me.updateCommentsView(needRender, me.disableSort, loadText);
|
||||
isSaveScrollPos && me.view.commentsView.scroller.scrollTop(scrollPos);
|
||||
}
|
||||
}, 25);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user