diff --git a/app/src/main/java/io/xpipe/app/comp/base/ToolbarComp.java b/app/src/main/java/io/xpipe/app/comp/base/ToolbarComp.java index 253110fd0..8c14689c1 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/ToolbarComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/ToolbarComp.java @@ -5,6 +5,7 @@ import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleCompStructure; import io.xpipe.app.util.PlatformThread; +import javafx.beans.binding.Bindings; import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; @@ -34,6 +35,7 @@ public class ToolbarComp extends Comp> { for (var entry : entries) { b.getItems().add(entry.createRegion()); } + b.visibleProperty().bind(Bindings.isNotEmpty(entries)); return new SimpleCompStructure<>(b); } } diff --git a/app/src/main/java/io/xpipe/app/util/ShellStoreFormat.java b/app/src/main/java/io/xpipe/app/util/ShellStoreFormat.java index 8221cbc79..7c5b3b377 100644 --- a/app/src/main/java/io/xpipe/app/util/ShellStoreFormat.java +++ b/app/src/main/java/io/xpipe/app/util/ShellStoreFormat.java @@ -62,7 +62,8 @@ public class ShellStoreFormat { .format(); } - var joined = Stream.concat(Stream.of(s.getTtyState() != null && s.getTtyState() != ShellTtyState.NONE ? "TTY" : null), Arrays.stream(info)).toArray(String[]::new); + var joined = Stream.concat(Stream.of(s.getTtyState() != null && s.getTtyState() != ShellTtyState.NONE ? "TTY" : null), + info != null ? Arrays.stream(info) : Stream.of()).toArray(String[]::new); return new ShellStoreFormat( LicenseProvider.get().checkOsName(s.getOsName()), formattedOsName(s.getOsName()),