Fix unread comment count

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-10-08 18:21:07 +02:00
parent 5f8c46b146
commit 3e8451e1e1
2 changed files with 3 additions and 2 deletions

View File

@@ -51,6 +51,7 @@ class ActivityController {
self.fetchUntilResults(); self.fetchUntilResults();
} }
self.activityservice.fetchNewerActivities(self.type, self.element.id).then(function () {}); self.activityservice.fetchNewerActivities(self.type, self.element.id).then(function () {});
self.cardservice.getCurrent().commentsUnread = 0;
}, true); }, true);
let $target = $('.newCommentForm .message'); let $target = $('.newCommentForm .message');

View File

@@ -30,7 +30,7 @@ const DECK_ACTIVITY_TYPE_CARD = 'deck_card';
/* global OC oc_requesttoken */ /* global OC oc_requesttoken */
class ActivityService { class ActivityService {
static get RESULT_PER_PAGE() { return 5; } static get RESULT_PER_PAGE() { return 50; }
constructor ($rootScope, $filter, $http, $q) { constructor ($rootScope, $filter, $http, $q) {
this.running = false; this.running = false;
@@ -116,7 +116,7 @@ class ActivityService {
}); });
} }
fetchMoreActivities(type, id) { fetchMoreActivities(type, id, success) {
this.checkData(type, id); this.checkData(type, id);
if (this.running === true) { if (this.running === true) {
return this.runningPromise; return this.runningPromise;