diff options
| author | Shpuld Shpuldson <shp@cock.li> | 2020-04-21 23:27:51 +0300 |
|---|---|---|
| committer | Shpuld Shpuldson <shp@cock.li> | 2020-04-21 23:27:51 +0300 |
| commit | 6bb75a3a6d8452a3e1b88085fe87cf27386f222c (patch) | |
| tree | 5142716edc3ad960329d212aba4b5250fbb0c1b9 /src/components/mute_card | |
| parent | d5457c323a186ed7890e7ba311c36d189c33d3fa (diff) | |
make relationships separate from users
Diffstat (limited to 'src/components/mute_card')
| -rw-r--r-- | src/components/mute_card/mute_card.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/components/mute_card/mute_card.js b/src/components/mute_card/mute_card.js index 65c9cfb5..be528d37 100644 --- a/src/components/mute_card/mute_card.js +++ b/src/components/mute_card/mute_card.js @@ -11,8 +11,11 @@ const MuteCard = { user () { return this.$store.getters.findUser(this.userId) }, + relationship () { + return this.$store.state.users.relationships[this.userId] + }, muted () { - return this.user.muted + return this.relationship.muting } }, components: { @@ -21,13 +24,13 @@ const MuteCard = { methods: { unmuteUser () { this.progress = true - this.$store.dispatch('unmuteUser', this.user.id).then(() => { + this.$store.dispatch('unmuteUser', this.userId).then(() => { this.progress = false }) }, muteUser () { this.progress = true - this.$store.dispatch('muteUser', this.user.id).then(() => { + this.$store.dispatch('muteUser', this.userId).then(() => { this.progress = false }) } |
