summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2023-04-20 17:21:15 +0200
committerLouis Chemineau <louis@chmn.me>2023-05-15 12:25:35 +0200
commit36d3fbd5763aed25df390e5e1bd393be7b63330a (patch)
treecda9a1e4bfe2705d540273972485255e062e36d4 /src
parent018c021e2894ccc678843aca337113e444480005 (diff)
Prevent error when displaying notifications
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'src')
-rw-r--r--src/components/TimelineEntry.vue2
-rw-r--r--src/components/UserEntry.vue6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/components/TimelineEntry.vue b/src/components/TimelineEntry.vue
index 6e4fd50b..0e1c49b1 100644
--- a/src/components/TimelineEntry.vue
+++ b/src/components/TimelineEntry.vue
@@ -45,7 +45,7 @@
{{ t('social', 'boosted') }}
</div>
</template>
- <UserEntry v-if="isNotification && notificationIsAboutAnAccount" :item="item.account" />
+ <UserEntry v-if="isNotification && notificationIsAboutAnAccount" :display-follow-button="false" :item="item.account" />
<template v-else>
<div v-if="entryContent" class="wrapper">
<TimelineAvatar v-if="!isNotification" class="entry__avatar" :item="entryContent" />
diff --git a/src/components/UserEntry.vue b/src/components/UserEntry.vue
index ca52c85e..cd0f8131 100644
--- a/src/components/UserEntry.vue
+++ b/src/components/UserEntry.vue
@@ -53,7 +53,7 @@
<!-- eslint-disable-next-line vue/no-v-html -->
<p v-html="item.note" />
</div>
- <FollowButton :uid="item.acct" />
+ <FollowButton v-if="displayFollowButton" :uid="item.acct" />
</div>
</div>
</template>
@@ -78,6 +78,10 @@ export default {
type: Object,
default: () => {},
},
+ displayFollowButton: {
+ type: Boolean,
+ default: true,
+ },
},
data() {
return {