Adding a small empty timeline view to make it more obvious when there is no content and when there is content

This commit is contained in:
Sam DuBois
2022-12-17 15:26:03 -07:00
committed by William Casarin
parent ea8394e7cf
commit d7d8076bee
4 changed files with 62 additions and 12 deletions

View File

@@ -14,8 +14,12 @@ struct DirectMessagesView: View {
var MainContent: some View {
ScrollView {
LazyVStack {
ForEach(model.dms, id: \.0) { tup in
MaybeEvent(tup)
if model.dms.isEmpty, !model.loading {
EmptyTimelineView()
} else {
ForEach(model.dms, id: \.0) { tup in
MaybeEvent(tup)
}
}
}
.padding(.horizontal)