Small fixes

This commit is contained in:
crschnick
2025-08-21 12:24:15 +00:00
parent b0c422e84a
commit 4330102ffa
3 changed files with 10 additions and 3 deletions
@@ -215,7 +215,7 @@ public class StoreCreationDialog {
modal.addButton(new ModalButton(
"skip",
() -> {
if (showInvalidConfirmAlert()) {
if (!model.wasChanged() || showInvalidConfirmAlert()) {
model.commit(false);
modal.close();
} else {
@@ -189,6 +189,14 @@ public class StoreCreationModel {
return !eq;
}
boolean wasChanged() {
if (existingEntry != null && existingEntry.getStore().equals(store.getValue())) {
return false;
}
return true;
}
void finish() {
if (finished.get()) {
return;
@@ -211,7 +219,7 @@ public class StoreCreationModel {
}
// We didn't change anything
if (existingEntry != null && existingEntry.getStore().equals(store.getValue())) {
if (!wasChanged()) {
commit(false);
return;
}
@@ -37,7 +37,6 @@ public interface SshIdentityStrategy {
var l = new ArrayList<Class<?>>();
l.add(NoneStrategy.class);
l.add(KeyFileStrategy.class);
l.add(OpenSshAgentStrategy.class);
if (OsType.getLocal() != OsType.WINDOWS) {
l.add(CustomAgentStrategy.class);
}