Skip to content

Commit a2835c1

Browse files
committed
fix: close stuck main window on connectAfterInstall failure
1 parent 8cf68a6 commit a2835c1

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

TablePro/Views/Connection/ConnectionFormView.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,13 @@ struct ConnectionFormView: View {
10421042
} catch {
10431043
Self.logger.error(
10441044
"Failed to connect after plugin install: \(error.localizedDescription, privacy: .public)")
1045+
NSApplication.shared.closeWindows(withId: "main")
1046+
openWindow(id: "welcome")
1047+
AlertHelper.showErrorSheet(
1048+
title: String(localized: "Connection Failed"),
1049+
message: error.localizedDescription,
1050+
window: nil
1051+
)
10451052
}
10461053
}
10471054
}

0 commit comments

Comments
 (0)