mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-06-14 19:29:31 +00:00
19 lines
416 B
Swift
19 lines
416 B
Swift
import SwiftUI
|
|
import Models
|
|
|
|
public enum StatusesState {
|
|
public enum PagingState {
|
|
case hasNextPage, loadingNextPage
|
|
}
|
|
case loading
|
|
case display(statuses: [Status], nextPageState: StatusesState.PagingState)
|
|
case error(error: Error)
|
|
}
|
|
|
|
@MainActor
|
|
public protocol StatusesFetcher: ObservableObject {
|
|
var statusesState: StatusesState { get }
|
|
func fetchStatuses() async
|
|
func fetchNextPage() async
|
|
}
|