From 0a146aef7f2f5ecb564c6e0c74f246c439d67199 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Wed, 19 Aug 2020 01:02:56 +0300 Subject: [PATCH] Fix optimistic update when unfollowing a relay --- src/lang/en.js | 3 ++- src/store/modules/relays.js | 2 +- src/views/settings/components/Relays.vue | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lang/en.js b/src/lang/en.js index 6181cf32..8e9629b2 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -150,7 +150,8 @@ export default { draft: 'Draft', delete: 'Delete', cancel: 'Cancel', - confirm: 'Confirm' + confirm: 'Confirm', + unfollow: 'Unfollow' }, errorLog: { tips: 'Please click the bug icon in the upper right corner', diff --git a/src/store/modules/relays.js b/src/store/modules/relays.js index 5cdeb353..2d611c0e 100644 --- a/src/store/modules/relays.js +++ b/src/store/modules/relays.js @@ -16,7 +16,7 @@ const relays = { state.fetchedRelays = [...state.fetchedRelays, { actor: relay }] }, DELETE_RELAY: (state, relay) => { - state.fetchedRelays = state.fetchedRelays.filter(fetchedRelay => fetchedRelay !== relay) + state.fetchedRelays = state.fetchedRelays.filter(fetchedRelay => fetchedRelay.actor !== relay) } }, actions: { diff --git a/src/views/settings/components/Relays.vue b/src/views/settings/components/Relays.vue index 8811dfea..e65b152c 100644 --- a/src/views/settings/components/Relays.vue +++ b/src/views/settings/components/Relays.vue @@ -2,7 +2,7 @@
- {{ $t('table.delete') }} + {{ $t('table.unfollow') }}