Merge branch 'issue-341-repeat-auto-scroll' into 'develop'

#341 - automatic scroll with repeats/reports

See merge request pleroma/pleroma-fe!568
This commit is contained in:
Shpuld Shpludson 2019-02-12 16:06:23 +00:00
commit 26954cb3dd

View file

@ -36,6 +36,13 @@ const conversation = {
status () { status () {
return this.statusoid return this.statusoid
}, },
statusId () {
if (this.statusoid.retweeted_status) {
return this.statusoid.retweeted_status.id
} else {
return this.statusoid.id
}
},
conversation () { conversation () {
if (!this.status) { if (!this.status) {
return [] return []
@ -79,7 +86,7 @@ const conversation = {
const conversationId = this.status.statusnet_conversation_id const conversationId = this.status.statusnet_conversation_id
this.$store.state.api.backendInteractor.fetchConversation({id: conversationId}) this.$store.state.api.backendInteractor.fetchConversation({id: conversationId})
.then((statuses) => this.$store.dispatch('addNewStatuses', { statuses })) .then((statuses) => this.$store.dispatch('addNewStatuses', { statuses }))
.then(() => this.setHighlight(this.statusoid.id)) .then(() => this.setHighlight(this.statusId))
} else { } else {
const id = this.$route.params.id const id = this.$route.params.id
this.$store.state.api.backendInteractor.fetchStatus({id}) this.$store.state.api.backendInteractor.fetchStatus({id})
@ -91,11 +98,7 @@ const conversation = {
return this.replies[id] || [] return this.replies[id] || []
}, },
focused (id) { focused (id) {
if (this.statusoid.retweeted_status) { return id === this.statusId
return (id === this.statusoid.retweeted_status.id)
} else {
return (id === this.statusoid.id)
}
}, },
setHighlight (id) { setHighlight (id) {
this.highlight = id this.highlight = id