Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/store/mutations.js')
-rw-r--r--src/store/mutations.js36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/store/mutations.js b/src/store/mutations.js
index 68f1a7376..37176badb 100644
--- a/src/store/mutations.js
+++ b/src/store/mutations.js
@@ -23,11 +23,11 @@ import orderBy from 'lodash/fp/orderBy'
import sortedUniqBy from 'lodash/fp/sortedUniqBy'
import Vue from 'vue'
-import {buildMailboxHierarchy} from '../imap/MailboxHierarchy'
-import {havePrefix} from '../imap/MailboxPrefix'
-import {normalizedFolderId, normalizedMessageId, normalizedEnvelopeListId} from './normalization'
-import {sortMailboxes} from '../imap/MailboxSorter'
-import {UNIFIED_ACCOUNT_ID} from './constants'
+import { buildMailboxHierarchy } from '../imap/MailboxHierarchy'
+import { havePrefix } from '../imap/MailboxPrefix'
+import { normalizedFolderId, normalizedMessageId, normalizedEnvelopeListId } from './normalization'
+import { sortMailboxes } from '../imap/MailboxSorter'
+import { UNIFIED_ACCOUNT_ID } from './constants'
const addFolderToState = (state, account) => (folder) => {
const id = normalizedFolderId(account.id, folder.id)
@@ -43,7 +43,7 @@ const sortAccounts = (accounts) => {
}
export default {
- savePreference(state, {key, value}) {
+ savePreference(state, { key, value }) {
Vue.set(state.preferences, key, value)
},
addAccount(state, account) {
@@ -70,10 +70,10 @@ export default {
editAccount(state, account) {
Vue.set(state.accounts, account.id, Object.assign({}, state.accounts[account.id], account))
},
- patchAccount(state, {account, data}) {
+ patchAccount(state, { account, data }) {
Vue.set(state.accounts, account.id, Object.assign({}, state.accounts[account.id], data))
},
- saveAccountsOrder(state, {account, order}) {
+ saveAccountsOrder(state, { account, order }) {
Vue.set(account, 'order', order)
Vue.set(
state,
@@ -87,7 +87,7 @@ export default {
expandAccount(state, accountId) {
state.accounts[accountId].collapsed = false
},
- addFolder(state, {account, folder}) {
+ addFolder(state, { account, folder }) {
// Flatten the existing ones before updating the hierarchy
const existing = account.folders.map((id) => state.folders[id])
existing.forEach((folder) => {
@@ -110,7 +110,7 @@ export default {
account.folders.push(id)
})
},
- addEnvelope(state, {accountId, folderId, query, envelope}) {
+ addEnvelope(state, { accountId, folderId, query, envelope }) {
const folder = state.folders[normalizedFolderId(accountId, folderId)]
Vue.set(state.envelopes, envelope.uuid, envelope)
const listId = normalizedEnvelopeListId(query)
@@ -133,17 +133,17 @@ export default {
)
})
},
- updateEnvelope(state, {envelope}) {
+ updateEnvelope(state, { envelope }) {
const existing = state.envelopes[envelope.uid]
if (!existing) {
return
}
Vue.set(existing, 'flags', envelope.flags)
},
- flagEnvelope(state, {envelope, flag, value}) {
+ flagEnvelope(state, { envelope, flag, value }) {
envelope.flags[flag] = value
},
- removeEnvelope(state, {accountId, folderId, uid}) {
+ removeEnvelope(state, { accountId, folderId, uid }) {
const folder = state.folders[normalizedFolderId(accountId, folderId)]
for (const listId in folder.envelopeLists) {
if (!Object.hasOwnProperty.call(folder.envelopeLists, listId)) {
@@ -184,14 +184,14 @@ export default {
}
})
},
- addMessage(state, {accountId, folderId, message}) {
+ addMessage(state, { accountId, folderId, message }) {
const uuid = normalizedMessageId(accountId, folderId, message.uid)
message.accountId = accountId
message.folderId = folderId
message.uuid = uuid
Vue.set(state.messages, uuid, message)
},
- updateDraft(state, {draft, data, newUid}) {
+ updateDraft(state, { draft, data, newUid }) {
// Update draft's UID
const oldUid = draft.uid
const uid = normalizedMessageId(draft.accountId, draft.folderId, newUid)
@@ -217,13 +217,13 @@ export default {
Vue.set(state.envelopes, uid, draft)
Vue.set(state.messages, uid, draft)
},
- removeMessage(state, {accountId, folderId, uid}) {
+ removeMessage(state, { accountId, folderId, uid }) {
Vue.delete(state.messages, normalizedMessageId(accountId, folderId, uid))
},
- createAlias(state, {account, alias}) {
+ createAlias(state, { account, alias }) {
account.aliases.push(alias)
},
- deleteAlias(state, {account, alias}) {
+ deleteAlias(state, { account, alias }) {
account.aliases.splice(account.aliases.indexOf(alias), 1)
},
}