From bced2e2d7419ab6a32595c569cadd82cb9261b00 Mon Sep 17 00:00:00 2001 From: Nick Satterly Date: Thu, 25 Nov 2021 11:45:23 +0100 Subject: [PATCH] fix: Do not reset stored user preferences on logout (#504) --- src/components/auth/ProfileMe.vue | 2 +- src/store/modules/preferences.store.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/auth/ProfileMe.vue b/src/components/auth/ProfileMe.vue index 075fa92f..c7e2be1a 100644 --- a/src/components/auth/ProfileMe.vue +++ b/src/components/auth/ProfileMe.vue @@ -223,7 +223,7 @@ export default { }, methods: { logout() { - this.$store.dispatch('resetUserPrefs') + this.$store.dispatch('clearUserPrefs') this.$store .dispatch('auth/logout') .then(response => { diff --git a/src/store/modules/preferences.store.ts b/src/store/modules/preferences.store.ts index 9fc9b897..945a2a27 100644 --- a/src/store/modules/preferences.store.ts +++ b/src/store/modules/preferences.store.ts @@ -92,6 +92,9 @@ const actions = { }) ) }, + clearUserPrefs({commit}) { + commit('RESET_PREFS') + }, getUserQueries({dispatch, commit}) { return UsersApi.getMeAttributes() .then(({attributes}) => {