From 0f824ff311bd3b1b8a0126ad9d7a2885440d3762 Mon Sep 17 00:00:00 2001 From: Moonman Date: Mon, 20 May 2019 15:23:36 -0400 Subject: [PATCH] switch from method to computed property --- src/components/status/status.js | 10 +++------- src/components/status/status.vue | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/status/status.js b/src/components/status/status.js index e2d2bb8b..ea4c2b9d 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -274,6 +274,9 @@ const Status = { }, ownStatus () { return this.status.user.id === this.$store.state.users.currentUser.id + }, + tags () { + return this.status.tags.filter(tagObj => tagObj.hasOwnProperty('name')).map(tagObj => tagObj.name).join(' ') } }, components: { @@ -289,13 +292,6 @@ const Status = { AvatarList }, methods: { - generateTagAttributes (tags) { - let res = {} - for (let tag of tags) { - res['data-tag-' + tag.name] = tag.name - } - return res - }, visibilityIcon (visibility) { switch (visibility) { case 'private': diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 24b2520f..9a062592 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -32,7 +32,7 @@ -
+