Make sure we always reset the comments collection if the id changes (#999)

Make sure we always reset the comments collection if the id changes
This commit is contained in:
Julius Härtl
2019-04-23 09:00:44 +02:00
committed by GitHub

View File

@@ -46,10 +46,11 @@ class ActivityController {
this.$scope.$watch(function () {
return self.element.id;
}, function (params) {
if (self.type === 'deck_card') {
self.activityservice.loadComments(self.element.id);
}
if (self.getData(self.element.id).length === 0) {
if (self.type === 'deck_card') {
self.activityservice.loadComments(self.element.id);
}
self.loading = true;
self.fetchUntilResults();
}