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 Popover from '../popover/popover.vue'
import { mapGetters } from 'vuex'
const ReactButton = { const ReactButton = {
props: ['status', 'loggedIn'], props: ['status', 'loggedIn'],
@ -32,7 +31,9 @@ const ReactButton = {
} }
return this.$store.state.instance.emoji || [] 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 = { const RetweetButton = {
props: ['status', 'loggedIn', 'visibility'], props: ['status', 'loggedIn', 'visibility'],
@ -28,7 +27,9 @@ const RetweetButton = {
'animate-spin': this.animated '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 { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
import { mentionMatchesUrl, extractTagFromUrl } from 'src/services/matcher/matcher.service.js' import { mentionMatchesUrl, extractTagFromUrl } from 'src/services/matcher/matcher.service.js'
import { filter, unescape, uniqBy } from 'lodash' import { filter, unescape, uniqBy } from 'lodash'
import { mapGetters, mapState } from 'vuex'
const Status = { const Status = {
name: 'Status', name: 'Status',
@ -323,11 +322,15 @@ const Status = {
hidePostStats () { hidePostStats () {
return this.mergedConfig.hidePostStats return this.mergedConfig.hidePostStats
}, },
...mapGetters(['mergedConfig']), currentUser () {
...mapState({ return this.$store.state.users.currentUser
betterShadow: state => state.interface.browserSupport.cssFilter, },
currentUser: state => state.users.currentUser betterShadow () {
}) return this.$store.state.interface.browserSupport.cssFilter
},
mergedConfig () {
return this.$store.getters.mergedConfig
}
}, },
components: { components: {
Attachment, Attachment,