diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 95e98dd73..c7b99a405 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -153,9 +153,10 @@ define([ if (this.mode.canComments) { this.api.asc_registerCallback('asc_onAddComment', _.bind(this.onApiAddComment, this)); this.api.asc_registerCallback('asc_onAddComments', _.bind(this.onApiAddComments, this)); - var collection = this.getApplication().getCollection('Common.Collections.Comments'); + var collection = this.getApplication().getCollection('Common.Collections.Comments'), + resolved = Common.Utils.InternalSettings.get("de-settings-resolvedcomment"); for (var i = 0; i < collection.length; ++i) { - if (collection.at(i).get('userid') !== this.mode.user.id) { + if (collection.at(i).get('userid') !== this.mode.user.id && (resolved || !collection.at(i).get('resolved'))) { this.leftMenu.markCoauthOptions('comments', true); break; } @@ -613,13 +614,15 @@ define([ }, onApiAddComment: function(id, data) { - if (data && data.asc_getUserId() !== this.mode.user.id) + var resolved = Common.Utils.InternalSettings.get("de-settings-resolvedcomment"); + if (data && data.asc_getUserId() !== this.mode.user.id && (resolved || !data.asc_getSolved())) this.leftMenu.markCoauthOptions('comments'); }, onApiAddComments: function(data) { + var resolved = Common.Utils.InternalSettings.get("de-settings-resolvedcomment"); for (var i = 0; i < data.length; ++i) { - if (data[i].asc_getUserId() !== this.mode.user.id) { + if (data[i].asc_getUserId() !== this.mode.user.id && (resolved || !data[i].asc_getSolved())) { this.leftMenu.markCoauthOptions('comments'); break; } diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index 47fe18f25..d2eb8531c 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -154,9 +154,10 @@ define([ this.api.asc_registerCallback('asc_onAddComments', _.bind(this.onApiAddComments, this)); var comments = this.getApplication().getController('Common.Controllers.Comments').groupCollection; for (var name in comments) { - var collection = comments[name]; + var collection = comments[name], + resolved = Common.Utils.InternalSettings.get("sse-settings-resolvedcomment"); for (var i = 0; i < collection.length; ++i) { - if (collection.at(i).get('userid') !== this.mode.user.id) { + if (collection.at(i).get('userid') !== this.mode.user.id && (resolved || !collection.at(i).get('resolved'))) { this.leftMenu.markCoauthOptions('comments', true); break; } @@ -663,13 +664,15 @@ define([ }, onApiAddComment: function(id, data) { - if (data && data.asc_getUserId() !== this.mode.user.id) + var resolved = Common.Utils.InternalSettings.get("sse-settings-resolvedcomment"); + if (data && data.asc_getUserId() !== this.mode.user.id && (resolved || !data.asc_getSolved())) this.leftMenu.markCoauthOptions('comments'); }, onApiAddComments: function(data) { + var resolved = Common.Utils.InternalSettings.get("sse-settings-resolvedcomment"); for (var i = 0; i < data.length; ++i) { - if (data[i].asc_getUserId() !== this.mode.user.id) { + if (data[i].asc_getUserId() !== this.mode.user.id && (resolved || !data[i].asc_getSolved())) { this.leftMenu.markCoauthOptions('comments'); break; }