1
0
mirror of https://github.com/metabolist/metatext synced 2024-12-12 09:26:13 +01:00
metatext-app-ios-iphone-ipad/Extensions/CollectionItem+Extensions.swift
Justin Mazzocchi ecb2197a07
Conversations
2020-11-06 17:54:19 -08:00

29 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
}
}
}