mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-14 04:21:01 +00:00
28 lines
782 B
Swift
28 lines
782 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import UIKit
|
|
import ViewModels
|
|
|
|
extension CollectionItem {
|
|
static let cellClasses = [
|
|
StatusListCell.self,
|
|
AccountListCell.self,
|
|
LoadMoreCell.self,
|
|
NotificationListCell.self,
|
|
ConversationListCell.self]
|
|
|
|
var cellClass: AnyClass {
|
|
switch self {
|
|
case .status:
|
|
return StatusListCell.self
|
|
case .account:
|
|
return AccountListCell.self
|
|
case .loadMore:
|
|
return LoadMoreCell.self
|
|
case let .notification(_, statusConfiguration):
|
|
return statusConfiguration == nil ? NotificationListCell.self : StatusListCell.self
|
|
case .conversation:
|
|
return ConversationListCell.self
|
|
}
|
|
}
|
|
}
|