commit 83c9289345a413b38621699b9763e6e148c3ead2
parent 4c3a83772ea247a3f61055c6dd681e7f5e9fbcfe
Author: OlegAba <mail@olegaba.com>
Date: Wed, 22 Feb 2023 18:37:05 -0500
Lazy loading of thread child events
Closes: #679
Diffstat:
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/damus/Views/ThreadV2View.swift b/damus/Views/ThreadV2View.swift
@@ -289,15 +289,17 @@ struct ThreadV2View: View {
).id("main")
// MARK: - Responses of the actual event view
- ForEach(thread.childEvents, id: \.id) { event in
- MutedEventView(
- damus_state: damus,
- event: event,
- scroller: reader,
- nav_target: $nav_target,
- navigating: $navigating,
- selected: false
- )
+ LazyVStack {
+ ForEach(thread.childEvents, id: \.id) { event in
+ MutedEventView(
+ damus_state: damus,
+ event: event,
+ scroller: nil,
+ nav_target: $nav_target,
+ navigating: $navigating,
+ selected: false
+ )
+ }
}
}.padding()
}.navigationBarTitle(NSLocalizedString("Thread", comment: "Navigation bar title for note thread."))