kopia lustrzana https://github.com/nextcloud/social
🐛 FIX: eslint && normal boost (parentAnnounce check)
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>pull/546/head
rodzic
c5f9828788
commit
d7baae9735
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="timeline-entry">
|
||||
<div v-if="item.type === 'Announce'" class="boost">
|
||||
<span class="icon-boost"></span>
|
||||
<span class="icon-boost" />
|
||||
<router-link v-if="item.actor_info" :to="{ name: 'profile', params: { account: item.local ? item.actor_info.preferredUsername : item.actor_info.account }}">
|
||||
<span v-tooltip.bottom="item.actor_info.account" class="post-author">
|
||||
{{ userDisplayName(item.actor_info) }}
|
||||
|
|
|
@ -55,18 +55,18 @@ const mutations = {
|
|||
state.account = account
|
||||
},
|
||||
boostPost(state, { post, parentAnnounce }) {
|
||||
if (!typeof state.timeline[post.id] === 'undefined') {
|
||||
if (typeof state.timeline[post.id] !== 'undefined') {
|
||||
Vue.set(state.timeline[post.id].action.values, 'boosted', true)
|
||||
}
|
||||
if (parentAnnounce) {
|
||||
if (typeof parentAnnounce.id !== 'undefined') {
|
||||
Vue.set(state.timeline[parentAnnounce.id].cache[parentAnnounce.object].object.action.values, 'boosted', true)
|
||||
}
|
||||
},
|
||||
unboostPost(state, { post, parentAnnounce }) {
|
||||
if (!typeof state.timeline[post.id] === 'undefined') {
|
||||
if (typeof state.timeline[post.id] !== 'undefined') {
|
||||
Vue.set(state.timeline[post.id].action.values, 'boosted', false)
|
||||
}
|
||||
if (parentAnnounce) {
|
||||
if (typeof parentAnnounce.id !== 'undefined') {
|
||||
Vue.set(state.timeline[parentAnnounce.id].cache[parentAnnounce.object].object.action.values, 'boosted', false)
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue