mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-27 08:46:44 +03:00
Bugfix: ask unload when mobile and message visible
This commit is contained in:
parent
470da2ee15
commit
45be0d7aa8
3 changed files with 5 additions and 7 deletions
|
|
@ -183,7 +183,7 @@ export class AppUser extends AbstractApp {
|
|||
super.bootstart();
|
||||
|
||||
addEventListener('beforeunload', event => {
|
||||
if (arePopupsVisible() || (!SettingsUserStore.layout() && MessageUserStore.message())) {
|
||||
if (arePopupsVisible() || (!SettingsUserStore.usePreviewPane() && MessageUserStore.message())) {
|
||||
event.preventDefault();
|
||||
return event.returnValue = i18n('POPUPS_ASK/EXIT_ARE_YOU_SURE');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,10 +50,10 @@ export const SettingsUserStore = new class {
|
|||
|
||||
self.init();
|
||||
|
||||
self.usePreviewPane = koComputable(() => self.layout() && !ThemeStore.isMobile());
|
||||
self.usePreviewPane = koComputable(() => ThemeStore.isMobile() ? 0 : self.layout());
|
||||
|
||||
const toggleLayout = () => {
|
||||
const value = ThemeStore.isMobile() ? 0 : self.layout();
|
||||
const value = self.usePreviewPane();
|
||||
$htmlCL.toggle('sm-msgView-side', Layout.SidePreview === value);
|
||||
$htmlCL.toggle('sm-msgView-bottom', Layout.BottomPreview === value);
|
||||
fireEvent('rl-layout', value);
|
||||
|
|
|
|||
|
|
@ -566,11 +566,9 @@ export class MailMessageList extends AbstractViewRight {
|
|||
// initMailboxLayoutResizer
|
||||
const top = dom.querySelector('.messageList'),
|
||||
fToggle = () => {
|
||||
let layout = SettingsUserStore.layout();
|
||||
let layout = SettingsUserStore.usePreviewPane();
|
||||
setLayoutResizer(top, ClientSideKeyNameMessageListSize,
|
||||
(ThemeStore.isMobile() || !layout)
|
||||
? 0
|
||||
: (Layout.SidePreview === layout ? 'Width' : 'Height')
|
||||
layout ? (Layout.SidePreview === layout ? 'Width' : 'Height') : 0
|
||||
);
|
||||
};
|
||||
if (top) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue