mirror of
https://github.com/metabolist/metatext.git
synced 2024-06-02 13:40:13 +00:00
18 lines
670 B
Swift
18 lines
670 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Combine
|
|
import Foundation
|
|
|
|
public protocol CollectionViewModel {
|
|
var collectionItems: AnyPublisher<[[CollectionItem]], Never> { get }
|
|
var alertItems: AnyPublisher<AlertItem, Never> { get }
|
|
var loading: AnyPublisher<Bool, Never> { get }
|
|
var navigationEvents: AnyPublisher<NavigationEvent, Never> { get }
|
|
var paginates: Bool { get }
|
|
var maintainScrollPositionOfItem: CollectionItem? { get }
|
|
func request(maxID: String?, minID: String?)
|
|
func itemSelected(_ item: CollectionItem)
|
|
func canSelect(item: CollectionItem) -> Bool
|
|
func viewModel(item: CollectionItem) -> Any?
|
|
}
|