cleanup & debug

This commit is contained in:
Henry Jameson 2026-01-27 23:13:23 +02:00
commit e0d9a71322
4 changed files with 6 additions and 4 deletions

View file

@ -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()
}

View file

@ -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 })
},

View file

@ -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(

View file

@ -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,