Save last value of all-day toggle
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
This commit is contained in:
parent
442f43d7e0
commit
34a2276c52
3 changed files with 12 additions and 0 deletions
|
@ -63,6 +63,7 @@ class SettingsService {
|
|||
'showHidden' => (int)$this->settings->getUserValue($this->userId, $this->appName,'various_showHidden'),
|
||||
'sortOrder' => (string)$this->settings->getUserValue($this->userId, $this->appName,'various_sortOrder'),
|
||||
'sortDirection' => (bool)$this->settings->getUserValue($this->userId, $this->appName,'various_sortDirection'),
|
||||
'allDay' => (bool)$this->settings->getUserValue($this->userId, $this->appName,'various_allDay'),
|
||||
'userID' => $this->userId
|
||||
);
|
||||
return $settings;
|
||||
|
|
|
@ -47,6 +47,14 @@ const getters = {
|
|||
* @returns {String} The sort direction
|
||||
*/
|
||||
sortDirection: (state) => state.settings.sortDirection,
|
||||
|
||||
/**
|
||||
* Returns if all-day is default
|
||||
*
|
||||
* @param {Object} state The store data
|
||||
* @returns {String} Whether all-day is default
|
||||
*/
|
||||
allDay: (state) => state.settings.allDay,
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
|
|
|
@ -1074,6 +1074,9 @@ const actions = {
|
|||
return task
|
||||
}
|
||||
context.commit('toggleAllDay', task)
|
||||
if (+context.rootState.settings.settings.allDay !== +task.allDay) {
|
||||
context.dispatch('setSetting', { type: 'allDay', value: +task.allDay })
|
||||
}
|
||||
context.dispatch('scheduleTaskUpdate', task)
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue