Changes for idea in #1150 (isSmall not active yet)

This commit is contained in:
the-djmaze 2023-08-28 10:11:34 +02:00
parent 53f8abc311
commit eb566ca9db
12 changed files with 35 additions and 21 deletions

View file

@ -10,6 +10,8 @@ let __themeTimer = 0;
export const
// Also see Styles/_Values.less @maxMobileWidth
isMobile = matchMedia('(max-width: 799px)'),
// https://github.com/the-djmaze/snappymail/issues/1150
// isSmall = matchMedia('(max-width: 1400px)'),
ThemeStore = {
theme: ko.observable(''),
@ -104,6 +106,9 @@ addSubscribablesTo(ThemeStore, {
isMobile.onchange = e => {
ThemeStore.isMobile(e.matches);
$htmlCL.toggle('rl-mobile', e.matches);
leftPanelDisabled(e.matches);
/*$htmlCL.contains('sm-msgView-side') || */leftPanelDisabled(e.matches);
};
isMobile.onchange(isMobile);
//isSmall.onchange = e => $htmlCL.contains('sm-msgView-side') && leftPanelDisabled(e.matches);
//isSmall.onchange(isSmall);