2020-08-18 05:13:37 +00:00
|
|
|
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import Combine
|
2020-08-30 23:33:11 +00:00
|
|
|
import Mastodon
|
2020-08-18 05:13:37 +00:00
|
|
|
|
|
|
|
protocol StatusListService {
|
|
|
|
var statusSections: AnyPublisher<[[Status]], Error> { get }
|
2020-08-30 05:31:30 +00:00
|
|
|
var filters: AnyPublisher<[Filter], Error> { get }
|
2020-08-28 22:39:17 +00:00
|
|
|
var paginates: Bool { get }
|
2020-08-24 04:34:19 +00:00
|
|
|
var contextParentID: String? { 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-26 09:19:38 +00:00
|
|
|
func request(maxID: String?, minID: String?) -> AnyPublisher<Never, 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 {
|
2020-08-28 22:39:17 +00:00
|
|
|
var paginates: Bool { true }
|
|
|
|
|
2020-08-24 04:34:19 +00:00
|
|
|
var contextParentID: String? { 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
|
|
|
}
|