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 коммит произвёл GitHub
Родитель 0c78f272b7 44db4bb40e
Коммит f2b0123f75
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -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();
}