mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-16 20:26:37 +00:00
Add pull to refresh on post detail
This commit is contained in:
parent
c11a31955c
commit
d31af12bb6
1 changed files with 5 additions and 0 deletions
|
@ -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 a new issue