aboutsummaryrefslogtreecommitdiff
path: root/src/components/favorite_button
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2019-10-29 07:41:29 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2019-10-29 07:41:29 +0000
commit21989c673ee3690f17ed3095e9fbc51501791c02 (patch)
treede26f9a87bcaa6d8e576cf33165247f5c66b61af /src/components/favorite_button
parent42f428d90e87315107dd20975548a5bd63dc2d53 (diff)
parentb66564a30dfadfdd2b216072931576c6c4dcbd61 (diff)
Merge branch 'settings-refactor' into 'develop'
Settings refactor See merge request pleroma/pleroma-fe!960
Diffstat (limited to 'src/components/favorite_button')
-rw-r--r--src/components/favorite_button/favorite_button.js8
-rw-r--r--src/components/favorite_button/favorite_button.vue4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/components/favorite_button/favorite_button.js b/src/components/favorite_button/favorite_button.js
index a24eacbf..5014d84f 100644
--- a/src/components/favorite_button/favorite_button.js
+++ b/src/components/favorite_button/favorite_button.js
@@ -1,10 +1,9 @@
+import { mapGetters } from 'vuex'
+
const FavoriteButton = {
props: ['status', 'loggedIn'],
data () {
return {
- hidePostStatsLocal: typeof this.$store.state.config.hidePostStats === 'undefined'
- ? this.$store.state.instance.hidePostStats
- : this.$store.state.config.hidePostStats,
animated: false
}
},
@@ -28,7 +27,8 @@ const FavoriteButton = {
'icon-star': this.status.favorited,
'animate-spin': this.animated
}
- }
+ },
+ ...mapGetters(['mergedConfig'])
}
}
diff --git a/src/components/favorite_button/favorite_button.vue b/src/components/favorite_button/favorite_button.vue
index 06ce9983..fbc90f84 100644
--- a/src/components/favorite_button/favorite_button.vue
+++ b/src/components/favorite_button/favorite_button.vue
@@ -6,7 +6,7 @@
:title="$t('tool_tip.favorite')"
@click.prevent="favorite()"
/>
- <span v-if="!hidePostStatsLocal && status.fave_num > 0">{{ status.fave_num }}</span>
+ <span v-if="!mergedConfig.hidePostStats && status.fave_num > 0">{{ status.fave_num }}</span>
</div>
<div v-else>
<i
@@ -14,7 +14,7 @@
class="button-icon favorite-button"
:title="$t('tool_tip.favorite')"
/>
- <span v-if="!hidePostStatsLocal && status.fave_num > 0">{{ status.fave_num }}</span>
+ <span v-if="!mergedConfig.hidePostStats && status.fave_num > 0">{{ status.fave_num }}</span>
</div>
</template>