mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 06:58:27 +03:00
Bugfix: rl.app.setExpandedFolder() undefined
This commit is contained in:
parent
661cd2aaf9
commit
bb4ff4fdc7
3 changed files with 22 additions and 24 deletions
|
|
@ -72,6 +72,25 @@ const
|
|||
};
|
||||
|
||||
export const
|
||||
/**
|
||||
* @param {string} sFullName
|
||||
* @param {boolean} bExpanded
|
||||
*/
|
||||
setExpandedFolder = (sFullName, bExpanded) => {
|
||||
let aExpandedList = Local.get(ClientSideKeyName.ExpandedFolders);
|
||||
if (!isArray(aExpandedList)) {
|
||||
aExpandedList = [];
|
||||
}
|
||||
|
||||
if (bExpanded) {
|
||||
aExpandedList.includes(sFullName) || aExpandedList.push(sFullName);
|
||||
} else {
|
||||
aExpandedList = aExpandedList.filter(value => value !== sFullName);
|
||||
}
|
||||
|
||||
Local.set(ClientSideKeyName.ExpandedFolders, aExpandedList);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {?Function} fCallback
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue