metatext/ServiceLayer/Sources/ServiceLayer/Status List Services/StatusListService.swift
Justin Mazzocchi 2ca0dfe251
wip
2020-08-31 11:57:02 -07:00

31 lines
962 B
Swift

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine
import Mastodon
public protocol StatusListService {
var statusSections: AnyPublisher<[[Status]], Error> { get }
var filters: AnyPublisher<[Filter], Error> { get }
var paginates: Bool { get }
var contextParentID: String? { get }
func isPinned(status: Status) -> Bool
func isReplyInContext(status: Status) -> Bool
func hasReplyFollowing(status: Status) -> Bool
func request(maxID: String?, minID: String?) -> AnyPublisher<Never, Error>
func statusService(status: Status) -> StatusService
func contextService(status: Status) -> ContextService
}
public extension StatusListService {
var paginates: Bool { true }
var contextParentID: String? { nil }
func isPinned(status: Status) -> Bool { false }
func isReplyInContext(status: Status) -> Bool { false }
func hasReplyFollowing(status: Status) -> Bool { false }
}