mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
Revamp the FullNameHash system for better readable urls
And reduce the folders caching footprint. And it reduces server load.
This commit is contained in:
parent
76627ae2f6
commit
3a61bb3e5a
10 changed files with 90 additions and 78 deletions
|
|
@ -657,20 +657,20 @@ class AppUser extends AbstractApp {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param {string} sFullNameHash
|
||||
* @param {string} sFullName
|
||||
* @param {boolean} bExpanded
|
||||
*/
|
||||
setExpandedFolder(sFullNameHash, bExpanded) {
|
||||
setExpandedFolder(sFullName, bExpanded) {
|
||||
let aExpandedList = Local.get(ClientSideKeyName.ExpandedFolders);
|
||||
if (!isArray(aExpandedList)) {
|
||||
aExpandedList = [];
|
||||
}
|
||||
|
||||
if (bExpanded) {
|
||||
if (!aExpandedList.includes(sFullNameHash))
|
||||
aExpandedList.push(sFullNameHash);
|
||||
if (!aExpandedList.includes(sFullName))
|
||||
aExpandedList.push(sFullName);
|
||||
} else {
|
||||
aExpandedList = aExpandedList.filter(value => value !== sFullNameHash);
|
||||
aExpandedList = aExpandedList.filter(value => value !== sFullName);
|
||||
}
|
||||
|
||||
Local.set(ClientSideKeyName.ExpandedFolders, aExpandedList);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue