diff --git a/src/App.vue b/src/App.vue index 4f8f43f1b7..c8f67217af 100644 --- a/src/App.vue +++ b/src/App.vue @@ -48,9 +48,9 @@ export default { } this.sync() - await this.$store.dispatch('fetchCurrentUserPrincipal') - await this.$store.dispatch('loadCollections') - this.$store.commit('hasCurrentUserPrincipalAndCollections', true) + await this.mainStore.fetchCurrentUserPrincipal() + await this.mainStore.loadCollections() + this.mainStore.hasCurrentUserPrincipalAndCollectionsMutation(true) }, methods: { reload() { @@ -59,7 +59,7 @@ export default { sync() { setTimeout(async () => { try { - await this.$store.dispatch('syncInboxes') + await this.mainStore.syncInboxes() logger.debug("Inboxes sync'ed in background") } catch (error) { diff --git a/src/components/AccountDefaultsSettings.vue b/src/components/AccountDefaultsSettings.vue index 9766d0318b..ff6254db51 100644 --- a/src/components/AccountDefaultsSettings.vue +++ b/src/components/AccountDefaultsSettings.vue @@ -74,7 +74,7 @@ export default { logger.debug('setting drafts mailbox to ' + draftsMailboxId) this.saving = true try { - await this.$store.dispatch('patchAccount', { + await this.mainStore.patchAccount({ account: this.account, data: { draftsMailboxId, @@ -101,7 +101,7 @@ export default { logger.debug('setting sent mailbox to ' + sentMailboxId) this.saving = true try { - await this.$store.dispatch('patchAccount', { + await this.mainStore.patchAccount({ account: this.account, data: { sentMailboxId, @@ -128,7 +128,7 @@ export default { logger.debug('setting trash mailbox to ' + trashMailboxId) this.saving = true try { - await this.$store.dispatch('patchAccount', { + await this.mainStore.patchAccount({ account: this.account, data: { trashMailboxId, @@ -155,7 +155,7 @@ export default { logger.debug('setting archive mailbox to ' + archiveMailboxId) this.saving = true try { - await this.$store.dispatch('patchAccount', { + await this.mainStore.patchAccount({ account: this.account, data: { archiveMailboxId, @@ -182,7 +182,7 @@ export default { logger.debug('setting junk mailbox to ' + junkMailboxId) this.saving = true try { - await this.$store.dispatch('patchAccount', { + await this.mainStore.patchAccount({ account: this.account, data: { junkMailboxId, @@ -209,7 +209,7 @@ export default { logger.debug('setting snooze mailbox to ' + snoozeMailboxId) this.saving = true try { - await this.$store.dispatch('patchAccount', { + await this.mainStore.patchAccount({ account: this.account, data: { snoozeMailboxId, diff --git a/src/components/AccountForm.vue b/src/components/AccountForm.vue index 7bb0dbba32..40ca89004e 100644 --- a/src/components/AccountForm.vue +++ b/src/components/AccountForm.vue @@ -239,7 +239,6 @@