mirror of
https://github.com/metabolist/metatext.git
synced 2024-06-02 21:49:36 +00:00
23 lines
916 B
Swift
23 lines
916 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Combine
|
|
import Foundation
|
|
|
|
public protocol CollectionViewModel {
|
|
var updates: AnyPublisher<CollectionUpdate, Never> { get }
|
|
var title: AnyPublisher<String, Never> { get }
|
|
var titleLocalizationComponents: AnyPublisher<[String], Never> { get }
|
|
var expandAll: AnyPublisher<ExpandAllState, Never> { get }
|
|
var alertItems: AnyPublisher<AlertItem, Never> { get }
|
|
var loading: AnyPublisher<Bool, Never> { get }
|
|
var events: AnyPublisher<CollectionItemEvent, Never> { get }
|
|
var shouldAdjustContentInset: Bool { get }
|
|
var nextPageMaxId: String? { get }
|
|
func request(maxId: String?, minId: String?)
|
|
func viewedAtTop(indexPath: IndexPath)
|
|
func select(indexPath: IndexPath)
|
|
func canSelect(indexPath: IndexPath) -> Bool
|
|
func viewModel(indexPath: IndexPath) -> CollectionItemViewModel
|
|
func toggleExpandAll()
|
|
}
|