damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 296d96d6dfa7172758d284be48aecc2c0ce0b120
parent 28854fdc93e38b1d883abfff94cee504855f093d
Author: Bryan Montz <bryanmontz@me.com>
Date:   Sat, 17 Jun 2023 07:20:50 -0500

rename RelayStatus to RelayStatusView

Diffstat:
Mdamus.xcodeproj/project.pbxproj | 8++++----
Mdamus/Views/Relays/RelayDetailView.swift | 2+-
Ddamus/Views/Relays/RelayStatus.swift | 33---------------------------------
Adamus/Views/Relays/RelayStatusView.swift | 33+++++++++++++++++++++++++++++++++
Mdamus/Views/Relays/RelayToggle.swift | 2+-
Mdamus/Views/Relays/RelayView.swift | 2+-
6 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/damus.xcodeproj/project.pbxproj b/damus.xcodeproj/project.pbxproj @@ -239,7 +239,7 @@ 4CE8794829941DA700F758CC /* RelayFilters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE8794729941DA700F758CC /* RelayFilters.swift */; }; 4CE8794C2995B59E00F758CC /* RelayMetadatas.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE8794B2995B59E00F758CC /* RelayMetadatas.swift */; }; 4CE8794E2996B16A00F758CC /* RelayToggle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE8794D2996B16A00F758CC /* RelayToggle.swift */; }; - 4CE879502996B2BD00F758CC /* RelayStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE8794F2996B2BD00F758CC /* RelayStatus.swift */; }; + 4CE879502996B2BD00F758CC /* RelayStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE8794F2996B2BD00F758CC /* RelayStatusView.swift */; }; 4CE879522996B68900F758CC /* RelayType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE879512996B68900F758CC /* RelayType.swift */; }; 4CE879552996BAB900F758CC /* RelayPaidDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE879542996BAB900F758CC /* RelayPaidDetail.swift */; }; 4CE879582996C45300F758CC /* ZapsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE879572996C45300F758CC /* ZapsView.swift */; }; @@ -682,7 +682,7 @@ 4CE8794729941DA700F758CC /* RelayFilters.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayFilters.swift; sourceTree = "<group>"; }; 4CE8794B2995B59E00F758CC /* RelayMetadatas.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayMetadatas.swift; sourceTree = "<group>"; }; 4CE8794D2996B16A00F758CC /* RelayToggle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayToggle.swift; sourceTree = "<group>"; }; - 4CE8794F2996B2BD00F758CC /* RelayStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayStatus.swift; sourceTree = "<group>"; }; + 4CE8794F2996B2BD00F758CC /* RelayStatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayStatusView.swift; sourceTree = "<group>"; }; 4CE879512996B68900F758CC /* RelayType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayType.swift; sourceTree = "<group>"; }; 4CE879542996BAB900F758CC /* RelayPaidDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayPaidDetail.swift; sourceTree = "<group>"; }; 4CE879572996C45300F758CC /* ZapsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZapsView.swift; sourceTree = "<group>"; }; @@ -1165,7 +1165,7 @@ 4CAAD8AF29888AD200060CEA /* RelayConfigView.swift */, F7908E91298B0F0700AB113A /* RelayDetailView.swift */, 4CE8794D2996B16A00F758CC /* RelayToggle.swift */, - 4CE8794F2996B2BD00F758CC /* RelayStatus.swift */, + 4CE8794F2996B2BD00F758CC /* RelayStatusView.swift */, 4CE879512996B68900F758CC /* RelayType.swift */, 4CDA128929E9D10C0006FA5A /* SignalView.swift */, ); @@ -1897,7 +1897,7 @@ 4FE60CDD295E1C5E00105A1F /* Wallet.swift in Sources */, 3AA247FF297E3D900090C62D /* RepostsView.swift in Sources */, 3AE45AF6297BB2E700C1D842 /* LibreTranslateServer.swift in Sources */, - 4CE879502996B2BD00F758CC /* RelayStatus.swift in Sources */, + 4CE879502996B2BD00F758CC /* RelayStatusView.swift in Sources */, 4CC7AAF4297F18B400430951 /* ReplyDescription.swift in Sources */, 4C75EFA427FA577B0006080F /* PostView.swift in Sources */, 4C30AC7229A5677A00E2BD5A /* NotificationsView.swift in Sources */, diff --git a/damus/Views/Relays/RelayDetailView.swift b/damus/Views/Relays/RelayDetailView.swift @@ -80,7 +80,7 @@ struct RelayDetailView: View { HStack { Text(relay) Spacer() - RelayStatus(connection: relay_connection) + RelayStatusView(connection: relay_connection) } } } diff --git a/damus/Views/Relays/RelayStatus.swift b/damus/Views/Relays/RelayStatus.swift @@ -1,33 +0,0 @@ -// -// RelayStatus.swift -// damus -// -// Created by William Casarin on 2023-02-10. -// - -import SwiftUI - -struct RelayStatus: View { - @ObservedObject var connection: RelayConnection - - var body: some View { - Group { - if connection.isConnecting { - ProgressView() - } else { - Image(connection.isConnected ? "globe" : "warning.fill") - .resizable() - .foregroundColor(connection.isConnected ? .green : .red) - } - } - .frame(width: 20, height: 20) - .padding(.trailing, 5) - } -} - -struct RelayStatusView_Previews: PreviewProvider { - static var previews: some View { - let connection = test_damus_state().pool.get_relay("relay")!.connection - RelayStatus(connection: connection) - } -} diff --git a/damus/Views/Relays/RelayStatusView.swift b/damus/Views/Relays/RelayStatusView.swift @@ -0,0 +1,33 @@ +// +// RelayStatusView.swift +// damus +// +// Created by William Casarin on 2023-02-10. +// + +import SwiftUI + +struct RelayStatusView: View { + @ObservedObject var connection: RelayConnection + + var body: some View { + Group { + if connection.isConnecting { + ProgressView() + } else { + Image(connection.isConnected ? "globe" : "warning.fill") + .resizable() + .foregroundColor(connection.isConnected ? .green : .red) + } + } + .frame(width: 20, height: 20) + .padding(.trailing, 5) + } +} + +struct RelayStatusView_Previews: PreviewProvider { + static var previews: some View { + let connection = test_damus_state().pool.get_relay("relay")!.connection + RelayStatusView(connection: connection) + } +} diff --git a/damus/Views/Relays/RelayToggle.swift b/damus/Views/Relays/RelayToggle.swift @@ -27,7 +27,7 @@ struct RelayToggle: View { var body: some View { HStack { if let relay_connection { - RelayStatus(connection: relay_connection) + RelayStatusView(connection: relay_connection) } RelayType(is_paid: state.relay_metadata.lookup(relay_id: relay_id)?.is_paid ?? false) Toggle(relay_id, isOn: toggle_binding(relay_id: relay_id)) diff --git a/damus/Views/Relays/RelayView.swift b/damus/Views/Relays/RelayView.swift @@ -21,7 +21,7 @@ struct RelayView: View { RemoveButton(privkey: privkey, showText: false) } else if let relay_connection { - RelayStatus(connection: relay_connection) + RelayStatusView(connection: relay_connection) } }