extract HomeModel from ContentView

huge refactor

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-05-24 12:57:40 -07:00
parent b230d430ee
commit 097cc54bba
27 changed files with 1221 additions and 371 deletions

View File

@@ -7,6 +7,16 @@
import Foundation
func insert_uniq<T: Equatable>(xs: inout [T], new_x: T) -> Bool {
for x in xs {
if x == new_x {
return false
}
}
xs.append(new_x)
return true
}
func insert_uniq_sorted_event(events: inout [NostrEvent], new_ev: NostrEvent, cmp: (NostrEvent, NostrEvent) -> Bool) -> Bool {
var i: Int = 0