Timeline: Refactor poll plain cells.

This commit is contained in:
SBiOSoftWhare
2022-02-28 15:00:32 +01:00
parent 2022b32fa8
commit 1b4e63a1fc
5 changed files with 14 additions and 14 deletions
@@ -16,7 +16,7 @@
import UIKit
class PollBaseBubbleCell: PollBubbleCell {
class PollBaseBubbleCell: PollPlainCell {
// MARK: - Properties
@@ -16,7 +16,7 @@
import Foundation
class PollBubbleCell: SizableBaseRoomCell, RoomCellReactionsDisplayable, RoomCellReadMarkerDisplayable {
class PollPlainCell: SizableBaseRoomCell, RoomCellReactionsDisplayable, RoomCellReadMarkerDisplayable {
private var pollView: UIView?
private var event: MXEvent?
@@ -62,4 +62,4 @@ class PollBubbleCell: SizableBaseRoomCell, RoomCellReactionsDisplayable, RoomCel
}
}
extension PollBubbleCell: RoomCellThreadSummaryDisplayable {}
extension PollPlainCell: RoomCellThreadSummaryDisplayable {}
@@ -16,7 +16,7 @@
import Foundation
class PollWithPaginationTitleBubbleCell: PollBubbleCell {
class PollWithPaginationTitlePlainCell: PollPlainCell {
override func setupViews() {
super.setupViews()
@@ -16,7 +16,7 @@
import Foundation
class PollWithoutSenderInfoBubbleCell: PollBubbleCell {
class PollWithoutSenderInfoPlainCell: PollPlainCell {
override func setupViews() {
super.setupViews()
@@ -249,9 +249,9 @@
- (void)registerPollCellsForTableView:(UITableView*)tableView
{
[tableView registerClass:PollBubbleCell.class forCellReuseIdentifier:PollBubbleCell.defaultReuseIdentifier];
[tableView registerClass:PollWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:PollWithoutSenderInfoBubbleCell.defaultReuseIdentifier];
[tableView registerClass:PollWithPaginationTitleBubbleCell.class forCellReuseIdentifier:PollWithPaginationTitleBubbleCell.defaultReuseIdentifier];
[tableView registerClass:PollPlainCell.class forCellReuseIdentifier:PollPlainCell.defaultReuseIdentifier];
[tableView registerClass:PollWithoutSenderInfoPlainCell.class forCellReuseIdentifier:PollWithoutSenderInfoPlainCell.defaultReuseIdentifier];
[tableView registerClass:PollWithPaginationTitlePlainCell.class forCellReuseIdentifier:PollWithPaginationTitlePlainCell.defaultReuseIdentifier];
}
- (void)registerLocationCellsForTableView:(UITableView*)tableView
@@ -517,13 +517,13 @@
{
return @{
// Incoming
@(RoomTimelineCellIdentifierIncomingPoll) : PollBubbleCell.class,
@(RoomTimelineCellIdentifierIncomingPollWithoutSenderInfo) : PollWithoutSenderInfoBubbleCell.class,
@(RoomTimelineCellIdentifierIncomingPollWithPaginationTitle) : PollWithPaginationTitleBubbleCell.class,
@(RoomTimelineCellIdentifierIncomingPoll) : PollPlainCell.class,
@(RoomTimelineCellIdentifierIncomingPollWithoutSenderInfo) : PollWithoutSenderInfoPlainCell.class,
@(RoomTimelineCellIdentifierIncomingPollWithPaginationTitle) : PollWithPaginationTitlePlainCell.class,
// Outoing
@(RoomTimelineCellIdentifierOutgoingPoll) : PollBubbleCell.class,
@(RoomTimelineCellIdentifierOutgoingPollWithoutSenderInfo) : PollWithoutSenderInfoBubbleCell.class,
@(RoomTimelineCellIdentifierOutgoingPollWithPaginationTitle) : PollWithPaginationTitleBubbleCell.class
@(RoomTimelineCellIdentifierOutgoingPoll) : PollPlainCell.class,
@(RoomTimelineCellIdentifierOutgoingPollWithoutSenderInfo) : PollWithoutSenderInfoPlainCell.class,
@(RoomTimelineCellIdentifierOutgoingPollWithPaginationTitle) : PollWithPaginationTitlePlainCell.class
};
}