mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-15 19:56:36 +00:00
Proper fix for looping timeline
This commit is contained in:
parent
1e7c25993a
commit
47436daaf2
3 changed files with 13 additions and 14 deletions
|
@ -48,7 +48,6 @@ public struct StatusesListView<Fetcher>: View where Fetcher: StatusesFetcher {
|
|||
|
||||
case let .display(statuses, nextPageState):
|
||||
ForEach(statuses, id: \.viewId) { status in
|
||||
if !status.isHidden {
|
||||
StatusRowView(viewModel: StatusRowViewModel(status: status,
|
||||
client: client,
|
||||
routerPath: routerPath,
|
||||
|
@ -61,7 +60,6 @@ public struct StatusesListView<Fetcher>: View where Fetcher: StatusesFetcher {
|
|||
fetcher.statusDidDisappear(status: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
switch nextPageState {
|
||||
case .hasNextPage:
|
||||
loadingRow
|
||||
|
|
|
@ -269,6 +269,7 @@ extension TimelineViewModel: StatusesFetcher {
|
|||
StatusDataControllerProvider.shared.updateDataControllers(for: statuses, client: client)
|
||||
|
||||
await datasource.set(statuses)
|
||||
statuses = await datasource.get()
|
||||
await cacheHome()
|
||||
|
||||
withAnimation {
|
||||
|
|
|
@ -9,7 +9,7 @@ actor TimelineDatasource {
|
|||
}
|
||||
|
||||
func get() -> [Status] {
|
||||
statuses
|
||||
statuses.filter{ !$0.isHidden }
|
||||
}
|
||||
|
||||
func count() -> Int {
|
||||
|
|
Loading…
Reference in a new issue