|
@ -10,17 +10,18 @@ import Foundation |
|
|
|
|
|
|
|
|
/// The data model for the SearchHome view, typically something global-like |
|
|
/// The data model for the SearchHome view, typically something global-like |
|
|
class SearchHomeModel: ObservableObject { |
|
|
class SearchHomeModel: ObservableObject { |
|
|
@Published var events: [NostrEvent] = [] |
|
|
@Published var events: [NostrEvent] |
|
|
@Published var loading: Bool = false |
|
|
@Published var loading: Bool = false |
|
|
|
|
|
|
|
|
var seen_pubkey: Set<String> = Set() |
|
|
var seen_pubkey: Set<String> = Set() |
|
|
let damus_state: DamusState |
|
|
var damus_state: DamusState |
|
|
let base_subid = UUID().description |
|
|
let base_subid = UUID().description |
|
|
let profiles_subid = UUID().description |
|
|
let profiles_subid = UUID().description |
|
|
let limit: UInt32 = 250 |
|
|
let limit: UInt32 = 250 |
|
|
|
|
|
|
|
|
init(damus_state: DamusState) { |
|
|
init() { |
|
|
self.damus_state = damus_state |
|
|
self.events = [] |
|
|
|
|
|
self.damus_state = .empty |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func get_base_filter() -> NostrFilter { |
|
|
func get_base_filter() -> NostrFilter { |
|
|