metatext/Shared/Services/Status List Services/StatusListService.swift

26 lines
806 B
Swift
Raw Normal View History

2020-08-18 05:13:37 +00:00
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine
protocol StatusListService {
var statusSections: AnyPublisher<[[Status]], Error> { get }
2020-08-19 22:16:03 +00:00
var contextParent: Status? { get }
2020-08-21 02:29:01 +00:00
func isPinned(status: Status) -> Bool
func isReplyInContext(status: Status) -> Bool
func hasReplyFollowing(status: Status) -> Bool
2020-08-18 05:13:37 +00:00
func request(maxID: String?, minID: String?) -> AnyPublisher<Void, Error>
2020-08-21 02:29:01 +00:00
func statusService(status: Status) -> StatusService
2020-08-19 22:16:03 +00:00
func contextService(status: Status) -> ContextService
}
extension StatusListService {
var contextParent: Status? { nil }
2020-08-21 02:29:01 +00:00
func isPinned(status: Status) -> Bool { false }
func isReplyInContext(status: Status) -> Bool { false }
func hasReplyFollowing(status: Status) -> Bool { false }
2020-08-18 05:13:37 +00:00
}