Cleanup some enums to consts

This commit is contained in:
the-djmaze 2023-04-03 10:29:26 +02:00
parent 91e60c1007
commit da2ab68fcc
13 changed files with 103 additions and 126 deletions

View file

@ -1,7 +1,7 @@
import ko from 'ko';
import { koComputable, addObservablesTo } from 'External/ko';
import { Layout } from 'Common/EnumsUser';
import { LayoutSideView, LayoutBottomView } from 'Common/EnumsUser';
import { pInt } from 'Common/Utils';
import { $htmlCL, SettingsGet, fireEvent } from 'Common/Globals';
import { ThemeStore } from 'Stores/Theme';
@ -54,8 +54,8 @@ export const SettingsUserStore = new class {
const toggleLayout = () => {
const value = self.usePreviewPane();
$htmlCL.toggle('sm-msgView-side', Layout.SidePreview === value);
$htmlCL.toggle('sm-msgView-bottom', Layout.BottomPreview === value);
$htmlCL.toggle('sm-msgView-side', LayoutSideView === value);
$htmlCL.toggle('sm-msgView-bottom', LayoutBottomView === value);
fireEvent('rl-layout', value);
};
self.layout.subscribe(toggleLayout);