Cache: Do not remember selected folder

This commit is contained in:
Alexander Zinchuk 2021-06-15 14:26:48 +03:00
parent 23e9754b9d
commit 814f920d57

View File

@ -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,
};
}