fix crash when opensshpubkey cant be made

fix expand button not enabled sometimes
This commit is contained in:
neon443 committed 2025-09-06 16:51:33 +01:00
1 parent 97ef265cd2
commit d1408ee5d5
2 files changed
+7 -2

No files matched your search

+6 -1
View File
@@ -52,7 +52,12 @@ struct Keypair: KeypairProtocol {
} }
var base64Pubkey: String { var base64Pubkey: String {
String(openSshPubkey.split(separator: " ")[1]) let split = openSshPubkey.split(separator: " ")
if split.count >= 2 {
return String(split[1])
} else {
return "Error creating OpenSSH Publickey"
}
} }
var base64Privkey: String { var base64Privkey: String {
+1 -1
View File
@@ -98,7 +98,7 @@ struct RecentsView: View {
.foregroundStyle(hostsManager.tint) .foregroundStyle(hostsManager.tint)
} }
.buttonStyle(.plain) .buttonStyle(.plain)
.disabled(historyLimit != 0) .disabled(historyLimit >= hostsManager.history.count)
.padding(.trailing, 10) .padding(.trailing, 10)
Button { Button {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.