Bugfix: when left panel disabled and dragstart messages, show panel

This commit is contained in:
the-djmaze 2022-11-22 11:14:56 +01:00
parent 1032d0eb45
commit 434ac21103
7 changed files with 21 additions and 18 deletions

View file

@ -1,7 +1,7 @@
import { MessageFlagsCache } from 'Common/Cache';
import { Notification } from 'Common/Enums';
import { MessageSetAction, ComposeType/*, FolderType*/ } from 'Common/EnumsUser';
import { doc, createElement, elementById, dropdowns, dropdownVisibility, SettingsGet } from 'Common/Globals';
import { doc, createElement, elementById, dropdowns, dropdownVisibility, SettingsGet, leftPanelDisabled } from 'Common/Globals';
import { plainToHtml } from 'Common/Html';
import { getNotification } from 'Common/Translator';
import { EmailModel } from 'Model/Email';
@ -15,6 +15,8 @@ import Remote from 'Remote/User/Fetch';
export const
moveAction = ko.observable(false),
dropdownsDetectVisibility = (() =>
dropdownVisibility(!!dropdowns.find(item => item.classList.contains('show')))
).debounce(50),
@ -356,3 +358,6 @@ populateMessageBody = (oMessage, popup) => {
}, oMessage.folder, oMessage.uid);
}
};
leftPanelDisabled.subscribe(value => value && moveAction(false));
moveAction.subscribe(value => value && leftPanelDisabled(false));