mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +03:00
dispatchEvent(new CustomEvent(...)) to fireEvent(...)
This commit is contained in:
parent
2d46eaa783
commit
44ee236709
9 changed files with 25 additions and 21 deletions
|
|
@ -3,7 +3,7 @@ import { koComputable } from 'External/ko';
|
|||
|
||||
import { Layout, EditorDefaultType } from 'Common/EnumsUser';
|
||||
import { pInt, addObservablesTo } from 'Common/Utils';
|
||||
import { $htmlCL, SettingsGet } from 'Common/Globals';
|
||||
import { $htmlCL, SettingsGet, fireEvent } from 'Common/Globals';
|
||||
import { ThemeStore } from 'Stores/Theme';
|
||||
|
||||
export const SettingsUserStore = new class {
|
||||
|
|
@ -48,7 +48,7 @@ export const SettingsUserStore = new class {
|
|||
$htmlCL.toggle('rl-no-preview-pane', Layout.NoPreview === value);
|
||||
$htmlCL.toggle('rl-side-preview-pane', Layout.SidePreview === value);
|
||||
$htmlCL.toggle('rl-bottom-preview-pane', Layout.BottomPreview === value);
|
||||
dispatchEvent(new CustomEvent('rl-layout', {detail:value}));
|
||||
fireEvent('rl-layout', value);
|
||||
};
|
||||
self.layout.subscribe(toggleLayout);
|
||||
ThemeStore.isMobile.subscribe(toggleLayout);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue