remove mapgetters from status related components

This commit is contained in:
Shpuld Shpuldson 2020-03-02 08:13:27 +02:00
parent a1e136f4e3
commit ed4825da0b
3 changed files with 15 additions and 10 deletions

View file

@ -1,5 +1,4 @@
import Popover from '../popover/popover.vue'
import { mapGetters } from 'vuex'
const ReactButton = {
props: ['status', 'loggedIn'],
@ -32,7 +31,9 @@ const ReactButton = {
}
return this.$store.state.instance.emoji || []
},
...mapGetters(['mergedConfig'])
mergedConfig () {
return this.$store.getters.mergedConfig
}
}
}

View file

@ -1,4 +1,3 @@
import { mapGetters } from 'vuex'
const RetweetButton = {
props: ['status', 'loggedIn', 'visibility'],
@ -28,7 +27,9 @@ const RetweetButton = {
'animate-spin': this.animated
}
},
...mapGetters(['mergedConfig'])
mergedConfig () {
return this.$store.getters.mergedConfig
}
}
}

View file

@ -19,7 +19,6 @@ import { processHtml } from 'src/services/tiny_post_html_processor/tiny_post_htm
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
import { mentionMatchesUrl, extractTagFromUrl } from 'src/services/matcher/matcher.service.js'
import { filter, unescape, uniqBy } from 'lodash'
import { mapGetters, mapState } from 'vuex'
const Status = {
name: 'Status',
@ -323,11 +322,15 @@ const Status = {
hidePostStats () {
return this.mergedConfig.hidePostStats
},
...mapGetters(['mergedConfig']),
...mapState({
betterShadow: state => state.interface.browserSupport.cssFilter,
currentUser: state => state.users.currentUser
})
currentUser () {
return this.$store.state.users.currentUser
},
betterShadow () {
return this.$store.state.interface.browserSupport.cssFilter
},
mergedConfig () {
return this.$store.getters.mergedConfig
}
},
components: {
Attachment,