mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(app): load quick css from the account scope after sign-in (#3394)
This commit is contained in:
1 parent
aa3b058ce6
commit
54ec74e4f9
1 file changed
+17
-9
@@ -784,9 +784,6 @@ class Accessibility {
|
|||||||
persistLocalMotionSettings(this.localMotionSettingsSnapshot);
|
persistLocalMotionSettings(this.localMotionSettingsSnapshot);
|
||||||
}
|
}
|
||||||
this.customThemeCss = readLocalCustomThemeCss();
|
this.customThemeCss = readLocalCustomThemeCss();
|
||||||
if (this.customThemeCss !== null) {
|
|
||||||
persistLocalCustomThemeCss(this.customThemeCss);
|
|
||||||
}
|
|
||||||
this.customThemeCssSyncAcrossDevices = readLocalCustomThemeCssSyncAcrossDevices();
|
this.customThemeCssSyncAcrossDevices = readLocalCustomThemeCssSyncAcrossDevices();
|
||||||
this.showNeko = readAndMigrateLocalShowNeko();
|
this.showNeko = readAndMigrateLocalShowNeko();
|
||||||
this.keepNekoStill = readAndMigrateLocalKeepNekoStill();
|
this.keepNekoStill = readAndMigrateLocalKeepNekoStill();
|
||||||
@@ -798,6 +795,7 @@ class Accessibility {
|
|||||||
this.initializeShowNekoSessionSync();
|
this.initializeShowNekoSessionSync();
|
||||||
this.initializeShowNekoStorageSync();
|
this.initializeShowNekoStorageSync();
|
||||||
this.initializeVideoSeekPreviewThumbnailsStorageSync();
|
this.initializeVideoSeekPreviewThumbnailsStorageSync();
|
||||||
|
this.initializeCustomThemeCssStorageSync();
|
||||||
this.applyStartupPresentationSettings();
|
this.applyStartupPresentationSettings();
|
||||||
initializeStore(this, () => this.initPersistence());
|
initializeStore(this, () => this.initPersistence());
|
||||||
}
|
}
|
||||||
@@ -1021,7 +1019,6 @@ class Accessibility {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
await this.applyStoredZoom();
|
await this.applyStoredZoom();
|
||||||
this.applyStoredCustomThemeCss();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private initializeMotionDetection() {
|
private initializeMotionDetection() {
|
||||||
@@ -1498,12 +1495,23 @@ class Accessibility {
|
|||||||
await this.applyZoom(zoomLevel);
|
await this.applyZoom(zoomLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
applyStoredCustomThemeCss(): void {
|
private initializeCustomThemeCssStorageSync(): void {
|
||||||
const customThemeCss = readLocalCustomThemeCss();
|
AppStorage.subscribe(
|
||||||
if (customThemeCss !== null) {
|
(event) => {
|
||||||
this.customThemeCss = customThemeCss;
|
if (
|
||||||
persistLocalCustomThemeCss(customThemeCss);
|
event.key !== null &&
|
||||||
|
event.key !== ACCESSIBILITY_CUSTOM_THEME_STORAGE_KEY &&
|
||||||
|
event.key !== ACCESSIBILITY_CUSTOM_THEME_SYNC_STORAGE_KEY
|
||||||
|
) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
runInAction(() => {
|
||||||
|
this.customThemeCss = readLocalCustomThemeCss();
|
||||||
|
this.customThemeCssSyncAcrossDevices = readLocalCustomThemeCssSyncAcrossDevices();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
{source: 'external'},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private applyStartupPresentationSettings(): void {
|
private applyStartupPresentationSettings(): void {
|
||||||
|
|||||||
Reference in new issue
Block a user