damus

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

commit 0c627ae0a026c332f7ed096a58237d9caaaf3240
parent 16c86c1d1c871657e18eb1718909b293dda508d3
Author: Bryan Montz <bryanmontz@me.com>
Date:   Sun, 16 Jul 2023 08:00:50 -0500

Swift cleanup: "init (" -> "init("

Signed-off-by: Bryan Montz <bryanmontz@me.com>
Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mdamus/Components/EndBlock.swift | 4++--
Mdamus/Components/NIP05Badge.swift | 2+-
Mdamus/Models/LikeCounter.swift | 2+-
Mdamus/Models/Post.swift | 2+-
Mdamus/Nostr/Nostr.swift | 2+-
Mdamus/Views/ActionBar/EventDetailBar.swift | 2+-
Mdamus/Views/BannerImageView.swift | 2+-
Mdamus/Views/Profile/EditMetadataView.swift | 2+-
Mdamus/Views/Profile/ProfilePicView.swift | 2+-
Mdamus/Views/UserRelaysView.swift | 2+-
10 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/damus/Components/EndBlock.swift b/damus/Components/EndBlock.swift @@ -10,11 +10,11 @@ import SwiftUI struct EndBlock: View { let height: CGFloat - init () { + init() { self.height = 10.0 } - init (height: Float) { + init(height: Float) { self.height = CGFloat(height) } diff --git a/damus/Components/NIP05Badge.swift b/damus/Components/NIP05Badge.swift @@ -16,7 +16,7 @@ struct NIP05Badge: View { @Environment(\.openURL) var openURL - init (nip05: NIP05, pubkey: String, contacts: Contacts, show_domain: Bool, clickable: Bool) { + init(nip05: NIP05, pubkey: String, contacts: Contacts, show_domain: Bool, clickable: Bool) { self.nip05 = nip05 self.pubkey = pubkey self.contacts = contacts diff --git a/damus/Models/LikeCounter.swift b/damus/Models/LikeCounter.swift @@ -18,7 +18,7 @@ class EventCounter { var our_events: [String: NostrEvent] = [:] var our_pubkey: String - init (our_pubkey: String) { + init(our_pubkey: String) { self.our_pubkey = our_pubkey } diff --git a/damus/Models/Post.swift b/damus/Models/Post.swift @@ -13,7 +13,7 @@ struct NostrPost { let references: [ReferencedId] let tags: [[String]] - init (content: String, references: [ReferencedId], kind: NostrKind = .text, tags: [[String]] = []) { + init(content: String, references: [ReferencedId], kind: NostrKind = .text, tags: [[String]] = []) { self.content = content self.references = references self.kind = kind diff --git a/damus/Nostr/Nostr.swift b/damus/Nostr/Nostr.swift @@ -10,7 +10,7 @@ import Foundation class Profile: Codable { var value: [String: AnyCodable] - init (name: String?, display_name: String?, about: String?, picture: String?, banner: String?, website: String?, lud06: String?, lud16: String?, nip05: String?, damus_donation: Int?) { + init(name: String?, display_name: String?, about: String?, picture: String?, banner: String?, website: String?, lud06: String?, lud16: String?, nip05: String?, damus_donation: Int?) { self.value = [:] self.name = name self.display_name = display_name diff --git a/damus/Views/ActionBar/EventDetailBar.swift b/damus/Views/ActionBar/EventDetailBar.swift @@ -14,7 +14,7 @@ struct EventDetailBar: View { @ObservedObject var bar: ActionBarModel - init (state: DamusState, target: String, target_pk: String) { + init(state: DamusState, target: String, target_pk: String) { self.state = state self.target = target self.target_pk = target_pk diff --git a/damus/Views/BannerImageView.swift b/damus/Views/BannerImageView.swift @@ -68,7 +68,7 @@ struct BannerImageView: View { @State var banner: String? - init (pubkey: String, profiles: Profiles, disable_animation: Bool, banner: String? = nil) { + init(pubkey: String, profiles: Profiles, disable_animation: Bool, banner: String? = nil) { self.pubkey = pubkey self.profiles = profiles self._banner = State(initialValue: banner) diff --git a/damus/Views/Profile/EditMetadataView.swift b/damus/Views/Profile/EditMetadataView.swift @@ -29,7 +29,7 @@ struct EditMetadataView: View { @StateObject var profileUploadObserver = ImageUploadingObserver() @StateObject var bannerUploadObserver = ImageUploadingObserver() - init (damus_state: DamusState) { + init(damus_state: DamusState) { self.damus_state = damus_state let data = damus_state.profiles.lookup(id: damus_state.pubkey) self.profile = data diff --git a/damus/Views/Profile/ProfilePicView.swift b/damus/Views/Profile/ProfilePicView.swift @@ -75,7 +75,7 @@ struct ProfilePicView: View { @State var picture: String? - init (pubkey: String, size: CGFloat, highlight: Highlight, profiles: Profiles, disable_animation: Bool, picture: String? = nil) { + init(pubkey: String, size: CGFloat, highlight: Highlight, profiles: Profiles, disable_animation: Bool, picture: String? = nil) { self.pubkey = pubkey self.profiles = profiles self.size = size diff --git a/damus/Views/UserRelaysView.swift b/damus/Views/UserRelaysView.swift @@ -14,7 +14,7 @@ struct UserRelaysView: View { @State var relay_state: [(String, Bool)] @State private var showAddButton = false - init (state: DamusState, relays: [String]) { + init(state: DamusState, relays: [String]) { self.state = state self.relays = relays let relay_state = UserRelaysView.make_relay_state(pool: state.pool, relays: relays)