diff --git a/src/boot/after_store.js b/src/boot/after_store.js index abc351549..c6ea61300 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -174,7 +174,6 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => { }) } } - console.log(config) const copyInstancePrefOption = (path) => { if (get(config, path) !== undefined) { @@ -473,7 +472,7 @@ const setConfig = async ({ store }) => { const checkOAuthToken = async ({ store }) => { const oauth = useOAuthStore() if (oauth.userToken) { - return store.dispatch('loginUser', oauth.getUserToken) + return store.dispatch('loginUser', oauth.userToken) } return Promise.resolve() } diff --git a/src/services/backend_interactor_service/backend_interactor_service.js b/src/services/backend_interactor_service/backend_interactor_service.js index ccbc76d2b..adc18ef7f 100644 --- a/src/services/backend_interactor_service/backend_interactor_service.js +++ b/src/services/backend_interactor_service/backend_interactor_service.js @@ -8,6 +8,8 @@ import apiService, { import notificationsFetcher from '../notifications_fetcher/notifications_fetcher.service.js' import timelineFetcher from '../timeline_fetcher/timeline_fetcher.service.js' +import { useInstanceStore } from 'src/stores/instance.js' + const backendInteractorService = (credentials) => ({ startFetchingTimeline({ timeline, @@ -55,7 +57,7 @@ const backendInteractorService = (credentials) => ({ }, startUserSocket({ store }) { - const serv = store.rootState.instance.server.replace('http', 'ws') + const serv = useInstanceStore().server.replace('http', 'ws') const url = getMastodonSocketURI({}, serv) return ProcessedWS({ url, id: 'Unified', credentials }) }, diff --git a/src/stores/i18n.js b/src/stores/i18n.js index d10269916..a18b1d4d2 100644 --- a/src/stores/i18n.js +++ b/src/stores/i18n.js @@ -23,7 +23,6 @@ export const useI18nStore = defineStore('i18n', { const value = originalValue || useSyncConfigStore().mergedConfig.interfaceLanguage - console.log(useSyncConfigStore().mergedConfig) messages.setLanguage(this.i18n, value) useEmojiStore().loadUnicodeEmojiData(value) Cookies.set( diff --git a/src/sw.js b/src/sw.js index c0337c3df..5f9615eee 100644 --- a/src/sw.js +++ b/src/sw.js @@ -10,6 +10,7 @@ import { storage } from 'src/lib/storage.js' import { parseNotification } from 'src/services/entity_normalizer/entity_normalizer.service.js' import { prepareNotificationObject } from 'src/services/notification_utils/notification_utils.js' import { cacheKey, emojiCacheKey, shouldCache } from 'src/services/sw/sw.js' +import { useInstanceStore } from 'src/stores/instance.js' // Collects all messages for service workers // Needed because service workers cannot use dynamic imports @@ -38,6 +39,7 @@ function getWindowClients() { const setSettings = async () => { const vuexState = await storage.getItem('vuex-lz') const locale = useSyncConfigStore().mergedConfig.interfaceLanguage || 'en' + console.log('LOCALE', locale) i18n.locale = locale const notificationsNativeArray = Object.entries( vuexState.config.notificationNative,