From 4a397ad233f6da450961ad7143d462ef6d95a4f2 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Thu, 27 Apr 2023 12:06:04 +0400 Subject: [PATCH] Do not cache right column open state on mobile --- src/global/cache.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/global/cache.ts b/src/global/cache.ts index 3a750d2d5..a5f7dd96a 100644 --- a/src/global/cache.ts +++ b/src/global/cache.ts @@ -40,6 +40,7 @@ import { isUserId } from './helpers'; import { getOrderedIds } from '../util/folderManager'; import { clearGlobalForLockScreen } from './reducers'; import { encryptSession } from '../util/passcode'; +import { getIsMobile } from '../hooks/useAppLayout'; const UPDATE_THROTTLE = 5000; @@ -409,22 +410,22 @@ export function serializeGlobal(global: T) { 'serviceNotifications', 'attachmentSettings', 'leftColumnWidth', - 'lastIsChatInfoShown', 'archiveSettings', 'mediaViewer', 'audioPlayer', 'shouldShowContextMenuHint', + 'trustedBotIds', + 'recentlyFoundChatIds', ]), + lastIsChatInfoShown: !getIsMobile() ? global.lastIsChatInfoShown : undefined, customEmojis: reduceCustomEmojis(global), users: reduceUsers(global), chats: reduceChats(global), messages: reduceMessages(global), - recentlyFoundChatIds: global.recentlyFoundChatIds, settings: reduceSettings(global), chatFolders: reduceChatFolders(global), groupCalls: reduceGroupCalls(global), availableReactions: reduceAvailableReactions(global), - trustedBotIds: global.trustedBotIds, passcode: pick(global.passcode, [ 'isScreenLocked', 'hasPasscode',