diff --git a/js/controller/ActivityController.js b/js/controller/ActivityController.js index cbbcf8323..847a36976 100644 --- a/js/controller/ActivityController.js +++ b/js/controller/ActivityController.js @@ -46,12 +46,16 @@ class ActivityController { return self.element.id; }, function (params) { if (self.getData(self.element.id).length === 0) { - self.activityservice.loadComments(self.element.id); + if (self.type === 'deck_card') { + self.activityservice.loadComments(self.element.id); + } self.loading = true; self.fetchUntilResults(); } self.activityservice.fetchNewerActivities(self.type, self.element.id).then(function () {}); - self.cardservice.getCurrent().commentsUnread = 0; + if (self.type === 'deck_card') { + self.cardservice.getCurrent().commentsUnread = 0; + } }, true); let $target = $('.newCommentForm .message'); diff --git a/js/service/ActivityService.js b/js/service/ActivityService.js index 903009ed2..c8da9fd37 100644 --- a/js/service/ActivityService.js +++ b/js/service/ActivityService.js @@ -124,7 +124,7 @@ class ActivityService { self.running = false; return response; }, function (error) { - if (error.status === 304) { + if (error.status === 304 || error.status === 404) { self.since[type][id].finished = true; } self.running = false; @@ -140,7 +140,9 @@ class ActivityService { if (!this.since[type][id].finished) { this.runningPromise = this.fetchCardActivities(type, id, this.since[type][id].oldest); this.runningPromise.then(function() { - self.commentCollection.fetchNext(); + if (type === 'deck_card') { + self.commentCollection.fetchNext(); + } }); return this.runningPromise; } diff --git a/templates/part.card.activity.html b/templates/part.card.activity.html index dde8ad76f..be0163b11 100644 --- a/templates/part.card.activity.html +++ b/templates/part.card.activity.html @@ -1,5 +1,5 @@
-
+
{{ $ctrl.currentUser.displayName }}