[Dev] Cache: Refactor audioPlayer to use pick (#2579)
This commit is contained in:
parent
787a9f5c93
commit
9fd73e86d6
@ -275,14 +275,6 @@ function unsafeMigrateCache(cached: GlobalState, initialState: GlobalState) {
|
|||||||
cached.customEmojis.forEmoji = {};
|
cached.customEmojis.forEmoji = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cached.audioPlayer) {
|
|
||||||
cached.audioPlayer = initialState.audioPlayer;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!cached.mediaViewer) {
|
|
||||||
cached.mediaViewer = initialState.mediaViewer;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO Remove in Jan 2023 (this was re-designed but can be hardcoded in cache)
|
// TODO Remove in Jan 2023 (this was re-designed but can be hardcoded in cache)
|
||||||
const { light: lightTheme } = cached.settings.themes;
|
const { light: lightTheme } = cached.settings.themes;
|
||||||
if (lightTheme?.patternColor === 'rgba(90, 110, 70, 0.6)' || !lightTheme?.patternColor) {
|
if (lightTheme?.patternColor === 'rgba(90, 110, 70, 0.6)' || !lightTheme?.patternColor) {
|
||||||
@ -398,9 +390,9 @@ export function serializeGlobal<T extends GlobalState>(global: T) {
|
|||||||
'attachmentSettings',
|
'attachmentSettings',
|
||||||
'leftColumnWidth',
|
'leftColumnWidth',
|
||||||
'lastIsChatInfoShown',
|
'lastIsChatInfoShown',
|
||||||
|
'mediaViewer',
|
||||||
|
'audioPlayer',
|
||||||
]),
|
]),
|
||||||
audioPlayer: global.audioPlayer,
|
|
||||||
mediaViewer: global.mediaViewer,
|
|
||||||
customEmojis: reduceCustomEmojis(global),
|
customEmojis: reduceCustomEmojis(global),
|
||||||
users: reduceUsers(global),
|
users: reduceUsers(global),
|
||||||
chats: reduceChats(global),
|
chats: reduceChats(global),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user