@@ -48,12 +48,14 @@ class ActivityService {
|
|||||||
}, this);
|
}, this);
|
||||||
this.commentCollection.on('sync', function(a) {
|
this.commentCollection.on('sync', function(a) {
|
||||||
for (let index in this.toEnhanceWithComments) {
|
for (let index in this.toEnhanceWithComments) {
|
||||||
|
if (this.toEnhanceWithComments.hasOwnProperty(index)) {
|
||||||
let item = this.toEnhanceWithComments[index];
|
let item = this.toEnhanceWithComments[index];
|
||||||
item.commentModel = this.commentCollection.get(item.subject_rich[1].comment);
|
item.commentModel = this.commentCollection.get(item.subject_rich[1].comment);
|
||||||
if (typeof item.commentModel !== 'undefined') {
|
if (typeof item.commentModel !== 'undefined') {
|
||||||
this.toEnhanceWithComments = this.toEnhanceWithComments.filter(entry => entry.id !== item.id);
|
this.toEnhanceWithComments = this.toEnhanceWithComments.filter(entry => entry.id !== item.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
var firstUnread = this.commentCollection.findWhere({isUnread: true});
|
var firstUnread = this.commentCollection.findWhere({isUnread: true});
|
||||||
if (typeof firstUnread !== 'undefined') {
|
if (typeof firstUnread !== 'undefined') {
|
||||||
this.commentCollection.updateReadMarker();
|
this.commentCollection.updateReadMarker();
|
||||||
|
|||||||
Reference in New Issue
Block a user