mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-02-05 03:38:55 +01:00
refs #53 Display reblog status when toot is reblogged
This commit is contained in:
parent
7d143104c8
commit
572dfdaae9
@ -17,7 +17,7 @@
|
||||
<el-button type="text" @click="openReply(message)">
|
||||
<icon name="reply" scale="0.9"></icon>
|
||||
</el-button>
|
||||
<el-button type="text" @click="changeReblog(message)">
|
||||
<el-button type="text" @click="changeReblog(message)" :class="message.reblogged ? 'reblogged' : ''">
|
||||
<icon name="retweet" scale="0.9"></icon>
|
||||
</el-button>
|
||||
<el-button type="text" @click="changeFavourite(message)" :class="message.favourited ? 'favourited' : ''">
|
||||
@ -166,6 +166,10 @@ function findLink (target) {
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.reblogged {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.favourited {
|
||||
color: #e6a23c;
|
||||
}
|
||||
|
@ -15,8 +15,11 @@ const Toot = {
|
||||
)
|
||||
client.post(`/statuses/${message.id}/reblog`, {}, (err, data, res) => {
|
||||
if (err) return reject(err)
|
||||
commit('TimelineSpace/updateToot', data, { root: true })
|
||||
resolve(data)
|
||||
// API returns new status when reblog.
|
||||
// Reblog target status is in the data.reblog.
|
||||
// So I send data.reblog as status for update local timeline.
|
||||
commit('TimelineSpace/updateToot', data.reblog, { root: true })
|
||||
resolve(data.reblog)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user