Bugfix: ask unload when mobile and message visible

This commit is contained in:
the-djmaze 2023-03-20 15:21:56 +01:00
parent 470da2ee15
commit 45be0d7aa8
3 changed files with 5 additions and 7 deletions

View file

@ -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);