summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaksim Sukharev <antreesy.web@gmail.com>2024-06-18 21:10:55 +0200
committerMaksim Sukharev <antreesy.web@gmail.com>2024-06-18 21:10:55 +0200
commit82450e5c7017c8ae874c9b9d02ff3f90a60e7046 (patch)
tree83eab3d7a08d2f8131d574c5647af76b86f5bbfd /src
parentc6071c3730424b2f7e55e16a6a2b13c3d7dfe0b3 (diff)
fix(federation): update counter after invites store update
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/stores/__tests__/federation.spec.js2
-rw-r--r--src/stores/federation.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/stores/__tests__/federation.spec.js b/src/stores/__tests__/federation.spec.js
index 77bf7b49c..f9fa443f9 100644
--- a/src/stores/__tests__/federation.spec.js
+++ b/src/stores/__tests__/federation.spec.js
@@ -249,7 +249,7 @@ describe('federationStore', () => {
expect(rejectShare).toHaveBeenCalledWith(invites[0].id)
expect(federationStore.pendingShares).toStrictEqual({})
expect(federationStore.acceptedShares).toMatchObject({ [invites[1].id]: invites[1] })
- expect(federationStore.pendingSharesCount).toBe(1)
+ expect(federationStore.pendingSharesCount).toBe(0)
})
it('skip already rejected invitations', async () => {
diff --git a/src/stores/federation.ts b/src/stores/federation.ts
index de40db644..c92a625f5 100644
--- a/src/stores/federation.ts
+++ b/src/stores/federation.ts
@@ -135,8 +135,8 @@ export const useFederationStore = defineStore('federation', {
try {
Vue.set(this.pendingShares[id], 'loading', 'reject')
await rejectShare(id)
- this.updatePendingSharesCount(Object.keys(this.pendingShares).length)
Vue.delete(this.pendingShares, id)
+ this.updatePendingSharesCount(Object.keys(this.pendingShares).length)
} catch (error) {
console.error(error)
showError(t('spreed', 'An error occurred while rejecting an invitation'))