chore (client): do not call getInstanceInfo twice

This commit is contained in:
naskya 2024-07-04 00:32:09 +09:00
parent aa01c3d8ce
commit 7d16beb7b4
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -69,6 +69,8 @@ function checkForSplash() {
(async () => {
await initializeInstanceCache();
const instance = getInstanceInfo();
console.info(`Firefish v${version}`);
if (_DEV_) {
@ -178,7 +180,7 @@ function checkForSplash() {
}
// #endregion
localStorage.setItem("v", getInstanceInfo().version);
localStorage.setItem("v", instance.version);
// Init service worker
initializeSw();
@ -332,7 +334,7 @@ function checkForSplash() {
};
// #endregion
const { defaultLightTheme, defaultDarkTheme } = getInstanceInfo();
const { defaultLightTheme, defaultDarkTheme } = instance;
if (defaultStore.state.themeInitial) {
if (defaultLightTheme != null)