mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-06-09 08:49:36 +00:00
4189a59cf6
* Initial iOS 17 + Observable migration * More Observation * More observation * Checkpoint * Checkpoint * Bump version to 1.8.0 * SwiftFormat * Fix home timeline switch on login * Fix sidebar routerPath * Fixes on detail view * Remove print changes * Simply detail view * More opt * Migrate DisplaySettingsLocalValues * Better post detail transition * Status detail animation finally right * Cleanup
24 lines
526 B
Swift
24 lines
526 B
Swift
import Combine
|
|
import Models
|
|
import Observation
|
|
import SwiftUI
|
|
|
|
public enum StatusesState {
|
|
public enum PagingState {
|
|
case hasNextPage, loadingNextPage, none
|
|
}
|
|
|
|
case loading
|
|
case display(statuses: [Status], nextPageState: StatusesState.PagingState)
|
|
case error(error: Error)
|
|
}
|
|
|
|
@MainActor
|
|
public protocol StatusesFetcher {
|
|
var statusesState: StatusesState { get }
|
|
func fetchNewestStatuses() async
|
|
func fetchNextPage() async
|
|
func statusDidAppear(status: Status)
|
|
func statusDidDisappear(status: Status)
|
|
}
|