File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -458,7 +458,7 @@ final class DatabaseManager {
458458 let profile = connection. sshProfileId. flatMap { SSHProfileStorage . shared. profile ( for: $0) }
459459 let sshConfig = connection. effectiveSSHConfig ( profile: profile)
460460 let isProfile = connection. sshProfileId != nil && profile != nil
461- let secretOwnerId = connection. sshProfileId. flatMap { profile != nil ? $0 : nil } ?? connection. id
461+ let secretOwnerId = ( isProfile ? connection. sshProfileId : nil ) ?? connection. id
462462
463463 guard sshConfig. enabled else {
464464 return connection
Original file line number Diff line number Diff line change @@ -464,7 +464,8 @@ struct WelcomeWindowView: View {
464464 }
465465
466466 private func connectionRow( for connection: DatabaseConnection ) -> some View {
467- ConnectionRow ( connection: connection, onConnect: { connectToDatabase ( connection) } )
467+ let sshProfile = connection. sshProfileId. flatMap { SSHProfileStorage . shared. profile ( for: $0) }
468+ return ConnectionRow ( connection: connection, sshProfile: sshProfile, onConnect: { connectToDatabase ( connection) } )
468469 . tag ( connection. id)
469470 . listRowInsets ( ThemeEngine . shared. activeTheme. spacing. listRowInsets. swiftUI)
470471 . listRowSeparator ( . hidden)
@@ -1011,6 +1012,7 @@ struct WelcomeWindowView: View {
10111012
10121013private struct ConnectionRow : View {
10131014 let connection : DatabaseConnection
1015+ let sshProfile : SSHProfile ?
10141016 var onConnect : ( ( ) -> Void ) ?
10151017
10161018 private var displayTag : ConnectionTag ? {
@@ -1066,8 +1068,7 @@ private struct ConnectionRow: View {
10661068 }
10671069
10681070 private var connectionSubtitle : String {
1069- let profile = connection. sshProfileId. flatMap { SSHProfileStorage . shared. profile ( for: $0) }
1070- let ssh = connection. effectiveSSHConfig ( profile: profile)
1071+ let ssh = connection. effectiveSSHConfig ( profile: sshProfile)
10711072 if ssh. enabled {
10721073 return " SSH : \( ssh. username) @ \( ssh. host) "
10731074 }
You can’t perform that action at this time.
0 commit comments