diff options
author | Anna Larch <anna@nextcloud.com> | 2021-12-23 16:33:55 +0300 |
---|---|---|
committer | Anna Larch <anna@nextcloud.com> | 2021-12-23 16:33:55 +0300 |
commit | 5fbe23c093cba49e1119480a5dd297362766a862 (patch) | |
tree | edaedac71c63a5aa01fb3812fd9f89c45a670ba8 /src | |
parent | cf3fd685cc24aed0d56fd83dacd261b33a55dc6a (diff) |
Add check for account id on removing mailbox prefix
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/store/mutations.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/store/mutations.js b/src/store/mutations.js index 218d6010d..45ce84e3b 100644 --- a/src/store/mutations.js +++ b/src/store/mutations.js @@ -59,12 +59,15 @@ const addMailboxToState = curry((state, account, mailbox) => { } Vue.set(state.mailboxes, mailbox.databaseId, mailbox) - const parent = Object.values(state.mailboxes).find(mb => mb.name === mailbox.path) + const parent = Object.values(state.mailboxes) + .filter(mb => mb.accountId === account.id) + .find(mb => mb.name === mailbox.path) if (mailbox.path === '' || !parent) { account.mailboxes.push(mailbox.databaseId) } else { parent.mailboxes.push(mailbox.databaseId) } + }) const sortAccounts = (accounts) => { |