From c7d6ee8702642713af3930dfe41142e7cf82cca9 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 23 Mar 2022 11:45:08 +0100 Subject: [PATCH] use Platform.isDesktop for minimum width --- main.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.ts b/main.ts index 6b63532..e347c3a 100644 --- a/main.ts +++ b/main.ts @@ -102,14 +102,14 @@ class CustomFrameView extends ItemView { `); } } + } - if (this.frame.minimumWidth) { - let parent = this.contentEl.closest(".workspace-split.mod-horizontal"); - if (parent) { - let minWidth = `${this.frame.minimumWidth + 2 * this.settings.padding}px`; - if (parent.style.width < minWidth) - parent.style.width = minWidth; - } + if (Platform.isDesktop && this.frame.minimumWidth) { + let parent = this.contentEl.closest(".workspace-split.mod-horizontal"); + if (parent) { + let minWidth = `${this.frame.minimumWidth + 2 * this.settings.padding}px`; + if (parent.style.width < minWidth) + parent.style.width = minWidth; } } };