From 289326855caa5e763439f89f2829c430056e79c3 Mon Sep 17 00:00:00 2001 From: wakarimasen Date: Sun, 5 Mar 2017 16:31:01 +0100 Subject: [PATCH] Add focused prop to status --- src/components/conversation/conversation.js | 3 +++ src/components/conversation/conversation.vue | 2 +- src/components/status/status.js | 7 ++----- .../status_or_conversation/status_or_conversation.vue | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index ecc76e71..524737fd 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -47,6 +47,9 @@ const conversation = { .then((status) => this.$store.dispatch('addNewStatuses', { statuses: [status] })) .then(() => this.fetchConversation()) } + }, + focused: function(id) { + return (id == this.statusoid.id) } } } diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index 9675e69f..8803dd57 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -8,7 +8,7 @@
- +
diff --git a/src/components/status/status.js b/src/components/status/status.js index 9550c19f..f1682e68 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -9,7 +9,8 @@ import { toInteger } from 'lodash' const Status = { props: [ 'statusoid', - 'expandable' + 'expandable', + 'focused' ], data: () => ({ replying: false, @@ -32,10 +33,6 @@ const Status = { return !!this.$store.state.users.currentUser }, muted () { return !this.unmuted && this.status.user.muted }, - focused () { - const id = toInteger(this.$route.params.id) - return (this.statusoid.id == id) - }, isReply () { return !!this.statusoid.in_reply_to_status_id } }, components: { diff --git a/src/components/status_or_conversation/status_or_conversation.vue b/src/components/status_or_conversation/status_or_conversation.vue index 4fabfab2..4aaaf2ff 100644 --- a/src/components/status_or_conversation/status_or_conversation.vue +++ b/src/components/status_or_conversation/status_or_conversation.vue @@ -1,7 +1,7 @@