mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-11 14:14:09 +01:00
Fix trending refresh
This commit is contained in:
parent
aa63dd5ab7
commit
1a7ef62fd6
@ -116,6 +116,9 @@ public struct TimelineView: View {
|
||||
viewModel.isTimelineVisible = false
|
||||
}
|
||||
.refreshable {
|
||||
if timeline == .trending {
|
||||
await viewModel.reset()
|
||||
}
|
||||
HapticManager.shared.fireHaptic(of: .dataRefresh(intensity: 0.3))
|
||||
await viewModel.fetchStatuses()
|
||||
HapticManager.shared.fireHaptic(of: .dataRefresh(intensity: 0.7))
|
||||
|
@ -92,6 +92,10 @@ class TimelineViewModel: ObservableObject {
|
||||
tag = try await client.get(endpoint: Tags.tag(id: id))
|
||||
} catch {}
|
||||
}
|
||||
|
||||
func reset() async {
|
||||
await datasource.reset()
|
||||
}
|
||||
|
||||
func handleEvent(event: any StreamEvent, currentAccount _: CurrentAccount) {
|
||||
Task {
|
||||
|
Loading…
Reference in New Issue
Block a user