Make NostrDB (and related) code build under the new extension target as well.

This change includes several source files related to NostrDB into the extension target as well, so that we can use it from that context (and thus enable more advanced push notification formatting and suppression)

To make this change possible, I had to split some source files as well as to move some functions to different files, to ensure we don't have to pull too much unnecessary code into the extension.

Testing
-------

PASS

Device: iPhone 15 Pro simulator
iOS: 17.0.1
Damus: This commit
Test steps:
1. Build DamusNotificationService. Should succeed. PASS
2. Build Damus (the app). PASS
3. Run app, scroll around some notes, go to a few different views, post a note. Should work as normal. PASS
This commit is contained in:
Daniel D’Aquino authored and William Casarin committed 2023-11-21 10:39:27 -08:00
1 parent ad75d8546c
commit 87860a7151
13 files changed
+438 -257

No files matched your search

-1
View File
@@ -145,4 +145,3 @@ func event_is_reply(_ refs: [EventRef]) -> Bool {
return evref.is_reply != nil
}
}
-5
View File
@@ -123,11 +123,6 @@ struct LightningInvoice<T> {
}
}
struct Blocks: Equatable {
let words: Int
let blocks: [Block]
}
func maybe_pointee<T>(_ p: UnsafeMutablePointer<T>!) -> T? {
guard p != nil else {
return nil