Allow user click on toot to view detail
This commit is contained in:
parent
af9ea04f7c
commit
b7f3fd2e04
|
@ -3,7 +3,7 @@
|
|||
<div class="icon">
|
||||
<img :src="originalMessage(message).account.avatar" @click="openUser(originalMessage(message).account)"/>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="detail" @click="openDetail(message)">
|
||||
<div class="toot-header">
|
||||
<div class="user" @click="openUser(originalMessage(message).account)">
|
||||
{{ username(originalMessage(message).account) }}
|
||||
|
|
|
@ -4,7 +4,6 @@ const TootDetail = {
|
|||
namespaced: true,
|
||||
state: {
|
||||
message: null,
|
||||
loading: false,
|
||||
ancestors: [],
|
||||
descendants: []
|
||||
},
|
||||
|
@ -12,9 +11,6 @@ const TootDetail = {
|
|||
changeToot (state, message) {
|
||||
state.message = message
|
||||
},
|
||||
changeLoading (state, value) {
|
||||
state.loading = value
|
||||
},
|
||||
updateAncestors (state, ancestors) {
|
||||
state.ancestors = ancestors
|
||||
},
|
||||
|
@ -28,7 +24,6 @@ const TootDetail = {
|
|||
},
|
||||
fetchToot ({ state, commit, rootState }, message) {
|
||||
return new Promise((resolve, reject) => {
|
||||
commit('TimelineSpace/Contents/SideBar/TootDetail/changeLoading', true, { root: true })
|
||||
const client = new Mastodon(
|
||||
{
|
||||
access_token: rootState.TimelineSpace.account.accessToken,
|
||||
|
@ -38,7 +33,6 @@ const TootDetail = {
|
|||
if (err) return reject(err)
|
||||
commit('updateAncestors', data.ancestors)
|
||||
commit('updateDescendants', data.descendants)
|
||||
commit('TimelineSpace/Contents/SideBar/TootDetail/changeLoading', false, { root: true })
|
||||
resolve(res)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue