metatext-app-ios-iphone-ipad/Services/Status List Services/StatusListService.swift

26 lines
811 B
Swift
Raw Normal View History

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