diff --git a/damus/ContentView.swift b/damus/ContentView.swift index 4d2bcece..86171b05 100644 --- a/damus/ContentView.swift +++ b/damus/ContentView.swift @@ -44,6 +44,15 @@ enum ThreadState { enum FilterState : Int { case posts_and_replies = 1 case posts = 0 + + func filter(privkey: String?, ev: NostrEvent) -> Bool { + switch self { + case .posts: + return !ev.is_reply(privkey) + case .posts_and_replies: + return true + } + } } struct ContentView: View {