Action Message: Fix pattern color (#5672)
This commit is contained in:
parent
cc7911abe8
commit
e8744fcec5
@ -284,6 +284,18 @@ function unsafeMigrateCache(cached: GlobalState, initialState: GlobalState) {
|
||||
cached.messages = initialState.messages;
|
||||
cached.chats.listIds = initialState.chats.listIds;
|
||||
}
|
||||
|
||||
if (cached.cacheVersion < 2) {
|
||||
if (cached.settings.themes.dark) {
|
||||
cached.settings.themes.dark.patternColor = initialState.settings.themes.dark!.patternColor;
|
||||
}
|
||||
|
||||
if (cached.settings.themes.light) {
|
||||
cached.settings.themes.light.patternColor = initialState.settings.themes.light!.patternColor;
|
||||
}
|
||||
|
||||
cached.cacheVersion = 2;
|
||||
}
|
||||
}
|
||||
|
||||
function updateCache(force?: boolean) {
|
||||
|
||||
@ -70,7 +70,7 @@ export const INITIAL_PERFORMANCE_STATE_MIN: PerformanceType = {
|
||||
};
|
||||
|
||||
export const INITIAL_GLOBAL_STATE: GlobalState = {
|
||||
cacheVersion: 1,
|
||||
cacheVersion: 2,
|
||||
isInited: true,
|
||||
attachMenu: { bots: {} },
|
||||
passcode: {},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user