incorrect seen context update -- fixed vue-store mutation

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-07-05 23:00:19 +03:00
1 parent 9244e8f58e
commit 5c8dd89a88
2 files changed
+3 -5

No files matched your search

-2
View File
@@ -31,9 +31,7 @@ Vue.mixin({
// any initialization we want to do for app state
setTimeout(async () => {
await when(() => userStore.isReady);
await store.dispatch('init')
console.log("start vue")
new Vue({
components: { App },
store,
+3 -3
View File
@@ -30,9 +30,9 @@ export default new Vuex.Store({
lastSeenAppVersion: userStore.lastSeenAppVersion,
},
mutations: {
storeSeenContexts(state, context) {
userStore.seenContexts.add(context);
state.seenContexts = Array.from(userStore.seenContexts);
storeSeenContexts(state, contexts) {
contexts.forEach(ctx => userStore.seenContexts.add(ctx));
state.seenContexts = contexts;
},
updateLastSeenAppVersion(state, appVersion) {
state.lastSeenAppVersion = appVersion;