From fc3cba399df4e7ac4b67d575ddd96ee500ecf7a7 Mon Sep 17 00:00:00 2001 From: crschnick Date: Mon, 14 Sep 2026 15:45:16 +0000 Subject: [PATCH] Rework network ports --- .../java/io/xpipe/app/hub/section/StoreSectionConfig.java | 2 +- app/src/main/java/io/xpipe/app/store/DataStoreProvider.java | 2 +- app/src/main/java/io/xpipe/app/store/ShellStore.java | 6 +++--- .../xpipe/ext/system/incus/IncusContainerStoreProvider.java | 4 ++-- .../io/xpipe/ext/system/lxd/LxdContainerStoreProvider.java | 4 ++-- .../ext/system/podman/PodmanContainerStoreProvider.java | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/hub/section/StoreSectionConfig.java b/app/src/main/java/io/xpipe/app/hub/section/StoreSectionConfig.java index 5ef0dacb6..639c8f05c 100644 --- a/app/src/main/java/io/xpipe/app/hub/section/StoreSectionConfig.java +++ b/app/src/main/java/io/xpipe/app/hub/section/StoreSectionConfig.java @@ -93,7 +93,7 @@ public class StoreSectionConfig { && (selector.excludeNonShown() || !matchesSelector)) { var showProvider = true; try { - showProvider = section.getEntry().getProvider().shouldShow(section.getWrapper()); + showProvider = section.getEntry().getProvider().shouldShow(section); } catch (Exception ignored) { } if (!showProvider) { diff --git a/app/src/main/java/io/xpipe/app/store/DataStoreProvider.java b/app/src/main/java/io/xpipe/app/store/DataStoreProvider.java index 595013e89..cd559e630 100644 --- a/app/src/main/java/io/xpipe/app/store/DataStoreProvider.java +++ b/app/src/main/java/io/xpipe/app/store/DataStoreProvider.java @@ -97,7 +97,7 @@ public interface DataStoreProvider { return true; } - default boolean shouldShow(StoreEntryWrapper w) { + default boolean shouldShow(StoreSection section) { return true; } diff --git a/app/src/main/java/io/xpipe/app/store/ShellStore.java b/app/src/main/java/io/xpipe/app/store/ShellStore.java index 656f6334c..faab30435 100644 --- a/app/src/main/java/io/xpipe/app/store/ShellStore.java +++ b/app/src/main/java/io/xpipe/app/store/ShellStore.java @@ -22,7 +22,7 @@ public interface ShellStore extends DataStore, FileSystemStore, ValidatableStore stopSessionIfNeeded(); } else { existingSession.getShellControl().waitForSubShellExit(); - return new StubShellControl(existingSession.getShellControl()); + return existingSession.getShellControl(); } } @@ -32,13 +32,13 @@ public interface ShellStore extends DataStore, FileSystemStore, ValidatableStore // Then, the cache returns null // getSession() - return new StubShellControl(session.getShellControl()); + return session.getShellControl(); } @Override default ShellSession newSession() { var func = shellFunction(); - var session = new ShellSession(() -> func.control()); + var session = new ShellSession(() -> new StubShellControl(func.control())); session.addListener(this); return session; } diff --git a/ext/system/src/main/java/io/xpipe/ext/system/incus/IncusContainerStoreProvider.java b/ext/system/src/main/java/io/xpipe/ext/system/incus/IncusContainerStoreProvider.java index 5c90b784e..2d8087f4f 100644 --- a/ext/system/src/main/java/io/xpipe/ext/system/incus/IncusContainerStoreProvider.java +++ b/ext/system/src/main/java/io/xpipe/ext/system/incus/IncusContainerStoreProvider.java @@ -37,8 +37,8 @@ public class IncusContainerStoreProvider implements ShellStoreProvider { } @Override - public boolean shouldShow(StoreEntryWrapper w) { - IncusContainerStore s = w.getEntry().getStore().asNeeded(); + public boolean shouldShow(StoreSection section) { + IncusContainerStore s = section.getEntry().getStore().asNeeded(); var state = s.getState(); return Boolean.TRUE.equals(state.getRunning()) || s.getInstall().getStore().getState().isShowNonRunning(); diff --git a/ext/system/src/main/java/io/xpipe/ext/system/lxd/LxdContainerStoreProvider.java b/ext/system/src/main/java/io/xpipe/ext/system/lxd/LxdContainerStoreProvider.java index a4f38576d..ad72bdd9f 100644 --- a/ext/system/src/main/java/io/xpipe/ext/system/lxd/LxdContainerStoreProvider.java +++ b/ext/system/src/main/java/io/xpipe/ext/system/lxd/LxdContainerStoreProvider.java @@ -37,8 +37,8 @@ public class LxdContainerStoreProvider implements ShellStoreProvider { } @Override - public boolean shouldShow(StoreEntryWrapper w) { - LxdContainerStore s = w.getEntry().getStore().asNeeded(); + public boolean shouldShow(StoreSection section) { + LxdContainerStore s = section.getEntry().getStore().asNeeded(); var state = s.getState(); return Boolean.TRUE.equals(state.getRunning()) || s.getCmd().getStore().getState().isShowNonRunning(); diff --git a/ext/system/src/main/java/io/xpipe/ext/system/podman/PodmanContainerStoreProvider.java b/ext/system/src/main/java/io/xpipe/ext/system/podman/PodmanContainerStoreProvider.java index 2526844f6..820753c63 100644 --- a/ext/system/src/main/java/io/xpipe/ext/system/podman/PodmanContainerStoreProvider.java +++ b/ext/system/src/main/java/io/xpipe/ext/system/podman/PodmanContainerStoreProvider.java @@ -29,8 +29,8 @@ public class PodmanContainerStoreProvider implements ShellStoreProvider { } @Override - public boolean shouldShow(StoreEntryWrapper w) { - PodmanContainerStore s = w.getEntry().getStore().asNeeded(); + public boolean shouldShow(StoreSection section) { + PodmanContainerStore s = section.getEntry().getStore().asNeeded(); var state = s.getState(); return Boolean.TRUE.equals(state.getRunning()) || s.getCmd() == null