build: fix a few warnings
This commit is contained in:
@@ -635,8 +635,6 @@ struct ContentView: View {
|
|||||||
try? pool.add_relay(.nwc(url: nwc.relay))
|
try? pool.add_relay(.nwc(url: nwc.relay))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let user_search_cache = UserSearchCache()
|
|
||||||
self.damus_state = DamusState(pool: pool,
|
self.damus_state = DamusState(pool: pool,
|
||||||
keypair: keypair,
|
keypair: keypair,
|
||||||
likes: EventCounter(our_pubkey: pubkey),
|
likes: EventCounter(our_pubkey: pubkey),
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ class RelayPool {
|
|||||||
case .string(let str) = msg
|
case .string(let str) = msg
|
||||||
else { return }
|
else { return }
|
||||||
|
|
||||||
self.ndb.process_event(str)
|
let _ = self.ndb.process_event(str)
|
||||||
})
|
})
|
||||||
let relay = Relay(descriptor: desc, connection: conn)
|
let relay = Relay(descriptor: desc, connection: conn)
|
||||||
self.relays.append(relay)
|
self.relays.append(relay)
|
||||||
@@ -220,10 +220,10 @@ class RelayPool {
|
|||||||
switch req {
|
switch req {
|
||||||
case .typical(let r):
|
case .typical(let r):
|
||||||
if case .event = r, let rstr = make_nostr_req(r) {
|
if case .event = r, let rstr = make_nostr_req(r) {
|
||||||
ndb.process_client_event(rstr)
|
let _ = ndb.process_client_event(rstr)
|
||||||
}
|
}
|
||||||
case .custom(let string):
|
case .custom(let string):
|
||||||
ndb.process_client_event(string)
|
let _ = ndb.process_client_event(string)
|
||||||
}
|
}
|
||||||
|
|
||||||
for relay in relays {
|
for relay in relays {
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ public struct RelayURL: Hashable, Equatable, Codable, CodingKeyRepresentable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init?(_ str: String) {
|
init?(_ str: String) {
|
||||||
guard let last = str.last else { return nil }
|
|
||||||
|
|
||||||
guard let url = URL(string: str) else {
|
guard let url = URL(string: str) else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -389,8 +389,7 @@ struct PostView: View {
|
|||||||
GeometryReader { (deviceSize: GeometryProxy) in
|
GeometryReader { (deviceSize: GeometryProxy) in
|
||||||
VStack(alignment: .leading, spacing: 0) {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
let searching = get_searching_string(focusWordAttributes.0)
|
let searching = get_searching_string(focusWordAttributes.0)
|
||||||
let searchingIsNil = searching == nil
|
|
||||||
|
|
||||||
TopBar
|
TopBar
|
||||||
|
|
||||||
ScrollViewReader { scroller in
|
ScrollViewReader { scroller in
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ func get_profile_url(picture: String?, pubkey: Pubkey, profiles: Profiles) -> UR
|
|||||||
func make_preview_profiles(_ pubkey: Pubkey) -> Profiles {
|
func make_preview_profiles(_ pubkey: Pubkey) -> Profiles {
|
||||||
let profiles = Profiles(ndb: test_damus_state.ndb)
|
let profiles = Profiles(ndb: test_damus_state.ndb)
|
||||||
let picture = "http://cdn.jb55.com/img/red-me.jpg"
|
let picture = "http://cdn.jb55.com/img/red-me.jpg"
|
||||||
let profile = Profile(name: "jb55", display_name: "William Casarin", about: "It's me", picture: picture, banner: "", website: "https://jb55.com", lud06: nil, lud16: nil, nip05: "jb55.com", damus_donation: nil)
|
//let profile = Profile(name: "jb55", display_name: "William Casarin", about: "It's me", picture: picture, banner: "", website: "https://jb55.com", lud06: nil, lud16: nil, nip05: "jb55.com", damus_donation: nil)
|
||||||
//let ts_profile = TimestampedProfile(profile: profile, timestamp: 0, event: test_note)
|
//let ts_profile = TimestampedProfile(profile: profile, timestamp: 0, event: test_note)
|
||||||
//profiles.add(id: pubkey, profile: ts_profile)
|
//profiles.add(id: pubkey, profile: ts_profile)
|
||||||
return profiles
|
return profiles
|
||||||
|
|||||||
Reference in New Issue
Block a user