mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-09-03 00:23:49 +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) {
|
.onChange(of: watcher.latestEvent?.id) {
|
||||||
guard let lastEvent = watcher.latestEvent else { return }
|
guard let lastEvent = watcher.latestEvent else { return }
|
||||||
viewModel.handleEvent(event: lastEvent, currentAccount: currentAccount.account)
|
viewModel.handleEvent(event: lastEvent, currentAccount: currentAccount.account)
|
||||||
|
|
Loading…
Reference in a new issue