Swift cleanup: remove duplicate or unnecessary initializers using default values

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:54 -05:00
committed by William Casarin
parent 6bf5293701
commit 0f1390f412
14 changed files with 31 additions and 139 deletions

View File

@@ -35,16 +35,8 @@ struct ProfileName: View {
@State var display_name: DisplayName?
@State var nip05: NIP05?
@State var donation: Int?
init(pubkey: String, profile: Profile?, damus: DamusState, show_nip5_domain: Bool = true) {
self.pubkey = pubkey
self.profile = profile
self.prefix = ""
self.show_nip5_domain = show_nip5_domain
self.damus_state = damus
}
init(pubkey: String, profile: Profile?, prefix: String, damus: DamusState, show_nip5_domain: Bool = true) {
init(pubkey: String, profile: Profile?, prefix: String = "", damus: DamusState, show_nip5_domain: Bool = true) {
self.pubkey = pubkey
self.profile = profile
self.prefix = prefix