Merge pull request #766 from amyspark/fix-retoots-opening

Fix retrieving a retoot's toot tree
This commit is contained in:
AkiraFukushima 2018-12-04 22:59:39 +09:00 committed by GitHub
commit 232733ab6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -90,8 +90,15 @@ export default {
Event.$off('focus-sidebar')
},
methods: {
originalMessage (message) {
if (message.reblog !== null) {
return message.reblog
} else {
return message
}
},
load () {
this.$store.dispatch('TimelineSpace/Contents/SideBar/TootDetail/fetchToot', this.message)
this.$store.dispatch('TimelineSpace/Contents/SideBar/TootDetail/fetchToot', this.originalMessage(this.message))
.then(() => {
const toot = this.$refs.original
toot.scrollIntoView()