simplify and fix issues with RelayStatus
This commit is contained in:
committed by
William Casarin
parent
2901cc860f
commit
28854fdc93
@@ -20,8 +20,8 @@ struct RelayView: View {
|
||||
if showActionButtons {
|
||||
RemoveButton(privkey: privkey, showText: false)
|
||||
}
|
||||
else {
|
||||
RelayStatus(pool: state.pool, relay: relay)
|
||||
else if let relay_connection {
|
||||
RelayStatus(connection: relay_connection)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,10 @@ struct RelayView: View {
|
||||
}
|
||||
}
|
||||
|
||||
private var relay_connection: RelayConnection? {
|
||||
state.pool.get_relay(relay)?.connection
|
||||
}
|
||||
|
||||
func CopyAction(relay: String) -> some View {
|
||||
Button {
|
||||
UIPasteboard.general.setValue(relay, forPasteboardType: "public.plain-text")
|
||||
|
||||
Reference in New Issue
Block a user