Fix discussions pagination

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-06-11 15:08:43 +02:00
parent fa8a958597
commit 160e5fbdae
4 changed files with 38 additions and 19 deletions

View File

@@ -107,11 +107,7 @@ import { ApolloCache, FetchResult, InMemoryCache } from "@apollo/client/core";
eventUUID: this.event.uuid,
};
},
update(data) {
return data.event.comments.map(
(comment: IComment) => new CommentModel(comment)
);
},
update: (data) => data.event.comments,
skip() {
return !this.event.uuid;
},

View File

@@ -57,7 +57,12 @@
<div v-if="!editMode && !comment.deletedAt" class="text-wrapper">
<div class="description-content" v-html="comment.text"></div>
<p
v-if="comment.insertedAt.getTime() !== comment.updatedAt.getTime()"
v-if="
comment.insertedAt &&
comment.updatedAt &&
new Date(comment.insertedAt).getTime() !==
new Date(comment.updatedAt).getTime()
"
:title="comment.updatedAt | formatDateTimeString"
>
{{