From e1ab6011e0172a0506e5a2e09fda1e92676941b1 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Wed, 16 Aug 2023 17:05:29 +0200 Subject: [PATCH] Drop syncConfigToGalaxy --- client/src/store/syncVuextoGalaxy.js | 4 ---- client/src/stores/syncConfigToGalaxy.js | 21 --------------------- 2 files changed, 25 deletions(-) delete mode 100644 client/src/stores/syncConfigToGalaxy.js diff --git a/client/src/store/syncVuextoGalaxy.js b/client/src/store/syncVuextoGalaxy.js index a1a0aac7bdc7..acec636dfcfa 100644 --- a/client/src/store/syncVuextoGalaxy.js +++ b/client/src/store/syncVuextoGalaxy.js @@ -9,7 +9,6 @@ import { defer } from "rxjs"; import { shareReplay } from "rxjs/operators"; import { waitForInit } from "utils/observable"; -import { syncConfigToGalaxy } from "@/stores/syncConfigToGalaxy"; import { syncUserToGalaxy } from "@/stores/users/syncUserToGalaxy"; // store subscriptions @@ -21,7 +20,4 @@ export const syncVuextoGalaxy = (store) => { // sets current user when galaxy changes syncUserToGalaxy(globalGalaxy$); - - // configuration - syncConfigToGalaxy(globalGalaxy$); }; diff --git a/client/src/stores/syncConfigToGalaxy.js b/client/src/stores/syncConfigToGalaxy.js deleted file mode 100644 index 5a5f0bc7b12b..000000000000 --- a/client/src/stores/syncConfigToGalaxy.js +++ /dev/null @@ -1,21 +0,0 @@ -import { map, pluck } from "rxjs/operators"; - -import { useConfigStore } from "@/stores/configurationStore"; - -export function syncConfigToGalaxy(galaxy$) { - const cfg$ = galaxy$.pipe( - pluck("config"), - // make sure we're not operating on that config by reference. - // we want a unique copy to stick into Vuex - map((config) => Object.assign({}, config)) - ); - - return cfg$.subscribe( - (cfg) => { - const configStore = useConfigStore(); - configStore.setConfiguration(cfg); - }, - (err) => console.log("syncConfigToGalaxy error", err), - () => console.log("syncConfigToGalaxy complete") - ); -}