mastodon-ios/Mastodon/Protocol/StatusProvider/StatusProvider.swift

25 lines
750 B
Swift
Raw Normal View History

2021-02-07 07:42:50 +01:00
//
// StatusProvider.swift
// Mastodon
//
// Created by sxiaojian on 2021/2/5.
//
import UIKit
import Combine
import CoreData
2021-02-07 07:42:50 +01:00
import CoreDataStack
protocol StatusProvider: NeedsDependency & DisposeBagCollectable & UIViewController {
// async
2021-02-07 07:42:50 +01:00
func toot() -> Future<Toot?, Never>
func toot(for cell: UITableViewCell, indexPath: IndexPath?) -> Future<Toot?, Never>
func toot(for cell: UICollectionViewCell) -> Future<Toot?, Never>
// sync
var managedObjectContext: NSManagedObjectContext { get }
var tableViewDiffableDataSource: UITableViewDiffableDataSource<StatusSection, Item>? { get }
func item(for cell: UITableViewCell?, indexPath: IndexPath?) -> Item?
2021-03-10 12:12:53 +01:00
func items(indexPaths: [IndexPath]) -> [Item]
2021-02-07 07:42:50 +01:00
}