Add pull to refresh on post detail
This commit is contained in:
parent
c11a31955c
commit
d31af12bb6
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue