From f0e8e6392b5ef99488ea0bbecbf9029e30ef0cfa Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Fri, 6 Apr 2018 01:36:34 +0900 Subject: Allow name property of user to be null --- src/client/app/mobile/views/components/notification.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/client/app/mobile/views/components/notification.vue') diff --git a/src/client/app/mobile/views/components/notification.vue b/src/client/app/mobile/views/components/notification.vue index 189d7195fb..62a0e6425e 100644 --- a/src/client/app/mobile/views/components/notification.vue +++ b/src/client/app/mobile/views/components/notification.vue @@ -8,7 +8,7 @@

- {{ notification.user.name }} + {{ getUserName(notification.user) }}

%fa:quote-left%{{ getPostSummary(notification.post) }} @@ -25,7 +25,7 @@

%fa:retweet% - {{ notification.post.user.name }} + {{ getUserName(notification.post.user) }}

%fa:quote-left%{{ getPostSummary(notification.post.repost) }}%fa:quote-right% @@ -45,7 +45,7 @@

%fa:user-plus% - {{ notification.user.name }} + {{ getUserName(notification.user) }}

@@ -66,7 +66,7 @@

%fa:chart-pie% - {{ notification.user.name }} + {{ getUserName(notification.user) }}

%fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right% @@ -80,12 +80,19 @@ import Vue from 'vue'; import getPostSummary from '../../../../../renderers/get-post-summary'; import getAcct from '../../../../../acct/render'; +import getUserName from '../../../../../renderers/get-user-name'; export default Vue.extend({ props: ['notification'], computed: { acct() { return getAcct(this.notification.user); + }, + name() { + return getUserName(this.notification.user); + }, + posterName() { + return getUserName(this.notification.post.user); } }, data() { -- cgit v1.2.3-freya