diff --git a/src/global/cache.ts b/src/global/cache.ts index 588116cee..be1f863a1 100644 --- a/src/global/cache.ts +++ b/src/global/cache.ts @@ -114,7 +114,6 @@ function updateCache() { 'authNearestCountry', 'currentUserId', 'contactList', - 'chatFolders', 'topPeers', 'recentEmojis', 'emojiKeywords', @@ -128,6 +127,7 @@ function updateCache() { recentlyFoundChatIds: global.globalSearch.recentlyFoundChatIds, }, settings: reduceSettings(global), + chatFolders: reduceChatFolders(global), }; const json = JSON.stringify(reducedGlobal); @@ -222,3 +222,10 @@ function reduceSettings(global: GlobalState): GlobalState['settings'] { notifyExceptions: {}, }; } + +function reduceChatFolders(global: GlobalState): GlobalState['chatFolders'] { + return { + ...global.chatFolders, + activeChatFolder: 0, + }; +}