diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreCreationComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreCreationComp.java index 4c5e2e25e..19df3a99a 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreCreationComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreCreationComp.java @@ -167,6 +167,9 @@ public class StoreCreationComp extends DialogComp { v -> true, (newE, context, validated) -> { ThreadHelper.runAsync(() -> { + if (context != null) { + context.close(); + } if (!DataStorage.get().getStoreEntries().contains(e)) { DataStorage.get().addStoreEntryIfNotPresent(newE); } else { @@ -196,7 +199,7 @@ public class StoreCreationComp extends DialogComp { (e, context, validated) -> { try { DataStorage.get().addStoreEntryIfNotPresent(e); - if (validated + if (context != null && validated && e.getProvider().shouldShowScan() && AppPrefs.get() .openConnectionSearchWindowOnConnectionCreation() diff --git a/core/src/main/java/io/xpipe/core/process/ProcessControl.java b/core/src/main/java/io/xpipe/core/process/ProcessControl.java index c8a054d8c..ef489093d 100644 --- a/core/src/main/java/io/xpipe/core/process/ProcessControl.java +++ b/core/src/main/java/io/xpipe/core/process/ProcessControl.java @@ -34,6 +34,8 @@ public interface ProcessControl extends AutoCloseable { @Override void close() throws Exception; + void shutdown() throws Exception; + void kill(); ProcessControl start() throws Exception; diff --git a/core/src/main/java/io/xpipe/core/store/ShellValidationContext.java b/core/src/main/java/io/xpipe/core/store/ShellValidationContext.java index a4710f5b4..0357c497e 100644 --- a/core/src/main/java/io/xpipe/core/store/ShellValidationContext.java +++ b/core/src/main/java/io/xpipe/core/store/ShellValidationContext.java @@ -17,7 +17,7 @@ public class ShellValidationContext implements ValidationContext { @Override public void close() { try { - shellControl.close(); + shellControl.shutdown(); } catch (Exception ignored) { } } diff --git a/lang/base/strings/translations_en.properties b/lang/base/strings/translations_en.properties index 7c1af8e59..b0d63da77 100644 --- a/lang/base/strings/translations_en.properties +++ b/lang/base/strings/translations_en.properties @@ -167,7 +167,6 @@ init=Init shell=Shell hub=Hub #context: Computer script -#force script=script