diff options
author | Joas Schilling <coding@schilljs.com> | 2021-04-26 16:39:51 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-04-26 16:39:51 +0200 |
commit | 7526a6af71e155b07a7da8b8ec9fc22f2cf82dd8 (patch) | |
tree | 578b23a3e31eae8068f22ffd37552a354215dec5 /src/store | |
parent | 47879377b2d329848be16418c09a4c800a5603a3 (diff) |
Call services from within the store
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/fileUploadStore.js | 4 | ||||
-rw-r--r-- | src/store/soundsStore.js | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/store/fileUploadStore.js b/src/store/fileUploadStore.js index 426ae7d06..c79c45819 100644 --- a/src/store/fileUploadStore.js +++ b/src/store/fileUploadStore.js @@ -28,6 +28,7 @@ import { findUniquePath } from '../utils/fileUpload' import createTemporaryMessage from '../utils/temporaryMessage' import { EventBus } from '../services/EventBus' import { shareFile } from '../services/filesSharingServices' +import { setAttachmentFolder } from '../services/settingsService' const state = { attachmentFolder: fromStateOr('spreed', 'attachment_folder', ''), @@ -316,7 +317,8 @@ const actions = { * @param {object} context default store context; * @param {string} attachmentFolder Folder to store new attachments in */ - setAttachmentFolder(context, attachmentFolder) { + async setAttachmentFolder(context, attachmentFolder) { + await setAttachmentFolder(attachmentFolder) context.commit('setAttachmentFolder', attachmentFolder) }, diff --git a/src/store/soundsStore.js b/src/store/soundsStore.js index 00f1b6963..41cb05712 100644 --- a/src/store/soundsStore.js +++ b/src/store/soundsStore.js @@ -22,6 +22,7 @@ import fromStateOr from './helper' import BrowserStorage from '../services/BrowserStorage' +import { setPlaySounds } from '../services/settingsService' const state = { userId: undefined, @@ -72,7 +73,8 @@ const actions = { * @param {object} context default store context; * @param {boolean} enabled Whether sounds should be played */ - setPlaySounds({ commit }, enabled) { + async setPlaySounds({ commit }, enabled) { + await setPlaySounds(status) commit('setPlaySounds', enabled) }, } |