search: use lazyvstack
we're gonna need this when expanding search results Changelog-Changed: Use LazyVStack in text search results Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -23,19 +23,21 @@ struct NDBSearchView: View {
|
|||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
|
|
||||||
ForEach(results, id: \.self) { note in
|
LazyVStack {
|
||||||
EventView(damus: damus_state, event: note)
|
ForEach(results, id: \.self) { note in
|
||||||
.onTapGesture {
|
EventView(damus: damus_state, event: note)
|
||||||
let event = note.get_inner_event(cache: damus_state.events) ?? note
|
.onTapGesture {
|
||||||
let thread = ThreadModel(event: event, damus_state: damus_state)
|
let event = note.get_inner_event(cache: damus_state.events) ?? note
|
||||||
damus_state.nav.push(route: Route.Thread(thread: thread))
|
let thread = ThreadModel(event: event, damus_state: damus_state)
|
||||||
}
|
damus_state.nav.push(route: Route.Thread(thread: thread))
|
||||||
.padding(.horizontal)
|
}
|
||||||
|
.padding(.horizontal)
|
||||||
ThiccDivider()
|
|
||||||
|
ThiccDivider()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if results.count == 0 {
|
} else if results.count == 0 {
|
||||||
HStack {
|
HStack {
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|||||||
Reference in New Issue
Block a user