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

Signed-off-by: Bryan Montz <bryanmontz@me.com>
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
Bryan Montz
2023-07-16 08:00:50 -05:00
committed by William Casarin
parent 16c86c1d1c
commit 0c627ae0a0
10 changed files with 11 additions and 11 deletions

View File

@@ -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)
}

View File

@@ -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

View File

@@ -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
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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)