2020-09-23 03:00:56 +02:00
|
|
|
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
|
2020-10-30 08:11:24 +01:00
|
|
|
import UIKit
|
2020-09-23 03:00:56 +02:00
|
|
|
import ViewModels
|
|
|
|
|
2020-10-15 09:44:01 +02:00
|
|
|
extension CollectionItem {
|
2020-10-30 08:11:24 +01:00
|
|
|
static let cellClasses = [
|
|
|
|
StatusListCell.self,
|
|
|
|
AccountListCell.self,
|
|
|
|
LoadMoreCell.self,
|
2020-10-29 07:03:45 +01:00
|
|
|
NotificationListCell.self,
|
|
|
|
ConversationListCell.self]
|
2020-10-15 09:44:01 +02:00
|
|
|
|
2020-09-23 03:00:56 +02:00
|
|
|
var cellClass: AnyClass {
|
|
|
|
switch self {
|
|
|
|
case .status:
|
|
|
|
return StatusListCell.self
|
|
|
|
case .account:
|
|
|
|
return AccountListCell.self
|
2020-10-02 05:19:14 +02:00
|
|
|
case .loadMore:
|
|
|
|
return LoadMoreCell.self
|
2020-10-30 08:11:24 +01:00
|
|
|
case let .notification(_, statusConfiguration):
|
|
|
|
return statusConfiguration == nil ? NotificationListCell.self : StatusListCell.self
|
2020-10-29 07:03:45 +01:00
|
|
|
case .conversation:
|
|
|
|
return ConversationListCell.self
|
2020-09-23 03:00:56 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|