Notifications

Changelog-Added: Add new Notifications View
This commit is contained in:
William Casarin
2023-02-21 12:27:03 -08:00
parent e4dd585754
commit 64b1a57918
27 changed files with 918 additions and 61 deletions

View File

@@ -0,0 +1,27 @@
//
// EventCache.swift
// damus
//
// Created by William Casarin on 2023-02-21.
//
import Foundation
class EventCache {
private var events: [String: NostrEvent]
func lookup(_ evid: String) -> NostrEvent? {
return events[evid]
}
func insert(_ ev: NostrEvent) {
guard events[ev.id] == nil else {
return
}
events[ev.id] = ev
}
init() {
self.events = [:]
}
}