eose loading spinners

Changelog-Added: Add [NIP-15](https://github.com/nostr-protocol/nips/blob/master/15.md) loading spinners
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-06-15 14:43:22 -07:00
parent 6de7d7ae58
commit dd7d9a4a66
8 changed files with 57 additions and 26 deletions

View File

@@ -33,6 +33,7 @@ struct InnerTimelineView: View {
struct TimelineView: View {
@Binding var events: [NostrEvent]
@Binding var loading: Bool
let damus: DamusState
@@ -44,6 +45,10 @@ struct TimelineView: View {
var MainContent: some View {
ScrollViewReader { scroller in
ScrollView {
if loading {
ProgressView()
.progressViewStyle(.circular)
}
InnerTimelineView(events: $events, damus: damus)
}
.onReceive(NotificationCenter.default.publisher(for: .scroll_to_top)) { _ in