kopia lustrzana https://github.com/nextcloud/social
🐛 FIX: don't error when boosting on an Announce whereof the original Note isn't in the stream as well
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>pull/546/head
rodzic
99b7b37e57
commit
2714c14e09
|
@ -55,13 +55,17 @@ const mutations = {
|
|||
state.account = account
|
||||
},
|
||||
boostPost(state, { post, parentAnnounce }) {
|
||||
Vue.set(state.timeline[post.id].action.values, 'boosted', true)
|
||||
if (!typeof state.timeline[post.id] === 'undefined') {
|
||||
Vue.set(state.timeline[post.id].action.values, 'boosted', true)
|
||||
}
|
||||
if (parentAnnounce) {
|
||||
Vue.set(state.timeline[parentAnnounce.id].cache[parentAnnounce.object].action.values, 'boosted', true)
|
||||
}
|
||||
},
|
||||
unboostPost(state, { post, parentAnnounce }) {
|
||||
Vue.set(state.timeline[post.id].action.values, 'boosted', false)
|
||||
if (!typeof state.timeline[post.id] === 'undefined') {
|
||||
Vue.set(state.timeline[post.id].action.values, 'boosted', false)
|
||||
}
|
||||
if (parentAnnounce) {
|
||||
Vue.set(state.timeline[parentAnnounce.id].cache[parentAnnounce.object].action.values, 'boosted', false)
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue