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:
committed by
William Casarin
parent
16c86c1d1c
commit
0c627ae0a0
@@ -10,11 +10,11 @@ import SwiftUI
|
|||||||
struct EndBlock: View {
|
struct EndBlock: View {
|
||||||
let height: CGFloat
|
let height: CGFloat
|
||||||
|
|
||||||
init () {
|
init() {
|
||||||
self.height = 10.0
|
self.height = 10.0
|
||||||
}
|
}
|
||||||
|
|
||||||
init (height: Float) {
|
init(height: Float) {
|
||||||
self.height = CGFloat(height)
|
self.height = CGFloat(height)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ struct NIP05Badge: View {
|
|||||||
|
|
||||||
@Environment(\.openURL) var openURL
|
@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.nip05 = nip05
|
||||||
self.pubkey = pubkey
|
self.pubkey = pubkey
|
||||||
self.contacts = contacts
|
self.contacts = contacts
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class EventCounter {
|
|||||||
var our_events: [String: NostrEvent] = [:]
|
var our_events: [String: NostrEvent] = [:]
|
||||||
var our_pubkey: String
|
var our_pubkey: String
|
||||||
|
|
||||||
init (our_pubkey: String) {
|
init(our_pubkey: String) {
|
||||||
self.our_pubkey = our_pubkey
|
self.our_pubkey = our_pubkey
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ struct NostrPost {
|
|||||||
let references: [ReferencedId]
|
let references: [ReferencedId]
|
||||||
let tags: [[String]]
|
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.content = content
|
||||||
self.references = references
|
self.references = references
|
||||||
self.kind = kind
|
self.kind = kind
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import Foundation
|
|||||||
class Profile: Codable {
|
class Profile: Codable {
|
||||||
var value: [String: AnyCodable]
|
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.value = [:]
|
||||||
self.name = name
|
self.name = name
|
||||||
self.display_name = display_name
|
self.display_name = display_name
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ struct EventDetailBar: View {
|
|||||||
|
|
||||||
@ObservedObject var bar: ActionBarModel
|
@ObservedObject var bar: ActionBarModel
|
||||||
|
|
||||||
init (state: DamusState, target: String, target_pk: String) {
|
init(state: DamusState, target: String, target_pk: String) {
|
||||||
self.state = state
|
self.state = state
|
||||||
self.target = target
|
self.target = target
|
||||||
self.target_pk = target_pk
|
self.target_pk = target_pk
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ struct BannerImageView: View {
|
|||||||
|
|
||||||
@State var banner: String?
|
@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.pubkey = pubkey
|
||||||
self.profiles = profiles
|
self.profiles = profiles
|
||||||
self._banner = State(initialValue: banner)
|
self._banner = State(initialValue: banner)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ struct EditMetadataView: View {
|
|||||||
@StateObject var profileUploadObserver = ImageUploadingObserver()
|
@StateObject var profileUploadObserver = ImageUploadingObserver()
|
||||||
@StateObject var bannerUploadObserver = ImageUploadingObserver()
|
@StateObject var bannerUploadObserver = ImageUploadingObserver()
|
||||||
|
|
||||||
init (damus_state: DamusState) {
|
init(damus_state: DamusState) {
|
||||||
self.damus_state = damus_state
|
self.damus_state = damus_state
|
||||||
let data = damus_state.profiles.lookup(id: damus_state.pubkey)
|
let data = damus_state.profiles.lookup(id: damus_state.pubkey)
|
||||||
self.profile = data
|
self.profile = data
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ struct ProfilePicView: View {
|
|||||||
|
|
||||||
@State var picture: String?
|
@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.pubkey = pubkey
|
||||||
self.profiles = profiles
|
self.profiles = profiles
|
||||||
self.size = size
|
self.size = size
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ struct UserRelaysView: View {
|
|||||||
@State var relay_state: [(String, Bool)]
|
@State var relay_state: [(String, Bool)]
|
||||||
@State private var showAddButton = false
|
@State private var showAddButton = false
|
||||||
|
|
||||||
init (state: DamusState, relays: [String]) {
|
init(state: DamusState, relays: [String]) {
|
||||||
self.state = state
|
self.state = state
|
||||||
self.relays = relays
|
self.relays = relays
|
||||||
let relay_state = UserRelaysView.make_relay_state(pool: state.pool, relays: relays)
|
let relay_state = UserRelaysView.make_relay_state(pool: state.pool, relays: relays)
|
||||||
|
|||||||
Reference in New Issue
Block a user