Add pull to refresh on post detail

This commit is contained in:
Thomas Ricouard 2023-12-10 08:42:26 +01:00
parent c11a31955c
commit d31af12bb6

View file

@ -93,6 +93,11 @@ public struct StatusDetailView: View {
}
}
}
.refreshable {
Task {
await viewModel.fetch()
}
}
.onChange(of: watcher.latestEvent?.id) {
guard let lastEvent = watcher.latestEvent else { return }
viewModel.handleEvent(event: lastEvent, currentAccount: currentAccount.account)