metatext/DB/Sources/DB/Entities/CollectionItem.swift

29 lines
839 B
Swift
Raw Normal View History

2020-10-05 06:36:22 +00:00
// Copyright © 2020 Metabolist. All rights reserved.
import Mastodon
public enum CollectionItem: Hashable {
2020-10-05 23:54:45 +00:00
case status(Status, StatusConfiguration)
2020-10-05 06:36:22 +00:00
case loadMore(LoadMore)
case account(Account)
}
public extension CollectionItem {
struct StatusConfiguration: Hashable {
2020-10-05 23:44:15 +00:00
public let isContextParent: Bool
public let isPinned: Bool
2020-10-05 06:36:22 +00:00
public let isReplyInContext: Bool
public let hasReplyFollowing: Bool
2020-10-05 23:54:45 +00:00
init(isContextParent: Bool = false,
2020-10-05 23:44:15 +00:00
isPinned: Bool = false,
isReplyInContext: Bool = false,
hasReplyFollowing: Bool = false) {
self.isContextParent = isContextParent
self.isPinned = isPinned
2020-10-05 06:36:22 +00:00
self.isReplyInContext = isReplyInContext
self.hasReplyFollowing = hasReplyFollowing
}
}
}