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

github.com/nextcloud/tasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRaimund Schlüßler <raimund.schluessler@mailbox.org>2020-04-30 12:09:12 +0300
committerGitHub <noreply@github.com>2020-04-30 12:09:12 +0300
commit740903e8838a044f5c548be7f4982da861b1f03d (patch)
tree69579ed26d9082619b74f598c7d85af46523a965 /src
parent82b396199261fb67cdc523e4eecf95510a25f1c4 (diff)
parent6ae02d256603904fe203b4410a4ba0dcd1c705cb (diff)
Merge pull request #996 from nextcloud/fix/noid/initial-route
Only save initial route on change
Diffstat (limited to 'src')
-rw-r--r--src/components/AppNavigation/List.vue4
-rw-r--r--src/store/settings.js9
2 files changed, 13 insertions, 0 deletions
diff --git a/src/components/AppNavigation/List.vue b/src/components/AppNavigation/List.vue
index 172256ae..ec407f5b 100644
--- a/src/components/AppNavigation/List.vue
+++ b/src/components/AppNavigation/List.vue
@@ -138,6 +138,7 @@ export default {
calendarCount: 'getCalendarCount',
isCalendarNameUsed: 'isCalendarNameUsed',
getTask: 'getTaskByUri',
+ initialRoute: 'initialRoute',
}),
},
methods: {
@@ -326,6 +327,9 @@ export default {
* @param {String} route The new initial route
*/
setInitialRoute(route) {
+ if (route === this.initialRoute) {
+ return
+ }
this.setSetting({ type: 'initialRoute', value: route })
},
},
diff --git a/src/store/settings.js b/src/store/settings.js
index 15779a3d..b5f00ca3 100644
--- a/src/store/settings.js
+++ b/src/store/settings.js
@@ -58,6 +58,14 @@ const getters = {
* @returns {String} Whether all-day is default
*/
allDay: (state) => state.settings.allDay,
+
+ /**
+ * Returns the initial route
+ *
+ * @param {Object} state The store data
+ * @returns {String} Whether all-day is default
+ */
+ initialRoute: (state) => state.settings.initialRoute,
}
const mutations = {
@@ -109,6 +117,7 @@ const actions = {
sortOrder: loadState('tasks', 'sortOrder'),
sortDirection: loadState('tasks', 'sortDirection'),
allDay: loadState('tasks', 'allDay'),
+ initialRoute: loadState('tasks', 'initialRoute'),
})
},
}