mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Bugfix: when left panel disabled and dragstart messages, show panel
This commit is contained in:
parent
1032d0eb45
commit
434ac21103
7 changed files with 21 additions and 18 deletions
|
|
@ -18,7 +18,6 @@ export const
|
|||
dropdowns = [],
|
||||
dropdownVisibility = ko.observable(false).extend({ rateLimit: 0 }),
|
||||
|
||||
moveAction = ko.observable(false),
|
||||
leftPanelDisabled = ko.observable(false),
|
||||
toggleLeftPanel = () => leftPanelDisabled(!leftPanelDisabled()),
|
||||
|
||||
|
|
@ -69,9 +68,4 @@ dropdownVisibility.subscribe(value => {
|
|||
}
|
||||
});
|
||||
|
||||
leftPanelDisabled.subscribe(value => {
|
||||
value && moveAction() && moveAction(false);
|
||||
$htmlCL.toggle('rl-left-panel-disabled', value);
|
||||
});
|
||||
|
||||
moveAction.subscribe(value => value && leftPanelDisabled(false));
|
||||
leftPanelDisabled.subscribe(value => $htmlCL.toggle('rl-left-panel-disabled', value));
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue