@@ -16,11 +16,10 @@ struct InnerTimelineView: View {
|
||||
@Binding var events: [NostrEvent]
|
||||
let damus: DamusState
|
||||
let show_friend_icon: Bool
|
||||
let filter: (NostrEvent) -> Bool
|
||||
|
||||
var body: some View {
|
||||
LazyVStack {
|
||||
ForEach(events.filter(filter), id: \.id) { (ev: NostrEvent) in
|
||||
ForEach(events, id: \.id) { (ev: NostrEvent) in
|
||||
let tm = ThreadModel(event: inner_event_or_self(ev: ev), pool: damus.pool, privkey: damus.keypair.privkey)
|
||||
let is_chatroom = has_hashtag(ev.tags, hashtag: "chat")
|
||||
let tv = ThreadView(thread: tm, damus: damus, is_chatroom: is_chatroom)
|
||||
@@ -42,8 +41,6 @@ struct TimelineView: View {
|
||||
let damus: DamusState
|
||||
let show_friend_icon: Bool
|
||||
|
||||
let filter: (NostrEvent) -> Bool
|
||||
|
||||
var body: some View {
|
||||
MainContent
|
||||
}
|
||||
@@ -55,7 +52,7 @@ struct TimelineView: View {
|
||||
ProgressView()
|
||||
.progressViewStyle(.circular)
|
||||
}
|
||||
InnerTimelineView(events: $events, damus: damus, show_friend_icon: show_friend_icon, filter: filter)
|
||||
InnerTimelineView(events: $events, damus: damus, show_friend_icon: show_friend_icon)
|
||||
}
|
||||
.onReceive(NotificationCenter.default.publisher(for: .scroll_to_top)) { _ in
|
||||
guard let event = events.first else {
|
||||
|
||||
Reference in New Issue
Block a user