metatext/Extensions/CollectionItem+Extensions.swift
2020-10-30 00:11:24 -07:00

26 lines
674 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]
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
}
}
}