mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 03:29:20 +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
|
|
@ -19,31 +19,9 @@ import { showMessageComposer } from 'Common/UtilsUser';
|
|||
import { FolderCreatePopupView } from 'View/Popup/FolderCreate';
|
||||
import { ContactsPopupView } from 'View/Popup/Contacts';
|
||||
|
||||
import { isArray } from 'Common/Utils';
|
||||
import { ClientSideKeyName } from 'Common/EnumsUser';
|
||||
import * as Local from 'Storage/Client';
|
||||
|
||||
import { moveMessagesToFolder } from 'Common/Folders';
|
||||
|
||||
/**
|
||||
* @param {string} sFullName
|
||||
* @param {boolean} bExpanded
|
||||
*/
|
||||
function setExpandedFolder(sFullName, bExpanded) {
|
||||
let aExpandedList = Local.get(ClientSideKeyName.ExpandedFolders);
|
||||
if (!isArray(aExpandedList)) {
|
||||
aExpandedList = [];
|
||||
}
|
||||
|
||||
if (bExpanded) {
|
||||
if (!aExpandedList.includes(sFullName))
|
||||
aExpandedList.push(sFullName);
|
||||
} else {
|
||||
aExpandedList = aExpandedList.filter(value => value !== sFullName);
|
||||
}
|
||||
|
||||
Local.set(ClientSideKeyName.ExpandedFolders, aExpandedList);
|
||||
}
|
||||
import { setExpandedFolder } from 'Model/FolderCollection';
|
||||
|
||||
export class MailFolderList extends AbstractViewLeft {
|
||||
constructor() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue