aboutsummaryrefslogtreecommitdiff
path: root/src/components/conversation/conversation.js
diff options
context:
space:
mode:
authordave <starpumadev@gmail.com>2019-02-12 05:10:27 -0500
committerdave <starpumadev@gmail.com>2019-02-12 05:10:27 -0500
commit493d542d9292f580460ddec78f9083b9fbae99ec (patch)
treeab120448b1e2fb7c58f8954d9761c64703638baa /src/components/conversation/conversation.js
parent8efe30c2dcc3d1ee22d00666ad6cb42f636ebb69 (diff)
#341 - automatic scroll with repeats/reports
Diffstat (limited to 'src/components/conversation/conversation.js')
-rw-r--r--src/components/conversation/conversation.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js
index c18781de..93e168d7 100644
--- a/src/components/conversation/conversation.js
+++ b/src/components/conversation/conversation.js
@@ -36,6 +36,13 @@ const conversation = {
status () {
return this.statusoid
},
+ actualId () {
+ if (this.statusoid.retweeted_status) {
+ return this.statusoid.retweeted_status.id
+ } else {
+ return this.statusoid.id
+ }
+ },
conversation () {
if (!this.status) {
return []
@@ -79,7 +86,7 @@ const conversation = {
const conversationId = this.status.statusnet_conversation_id
this.$store.state.api.backendInteractor.fetchConversation({id: conversationId})
.then((statuses) => this.$store.dispatch('addNewStatuses', { statuses }))
- .then(() => this.setHighlight(this.statusoid.id))
+ .then(() => this.setHighlight(this.actualId))
} else {
const id = this.$route.params.id
this.$store.state.api.backendInteractor.fetchStatus({id})
@@ -91,11 +98,7 @@ const conversation = {
return this.replies[id] || []
},
focused (id) {
- if (this.statusoid.retweeted_status) {
- return (id === this.statusoid.retweeted_status.id)
- } else {
- return (id === this.statusoid.id)
- }
+ return id === this.actualId
},
setHighlight (id) {
this.highlight = id