RoomVC: Make membership events use less screen

Add RoomMembershipBubbleCellWithPaginationTitleBubbleCell
This commit is contained in:
manuroe
2017-07-05 12:29:54 +02:00
parent f29fa8e8ef
commit 09b27c84f5
7 changed files with 231 additions and 8 deletions
+10 -1
View File
@@ -86,6 +86,7 @@
#import "RoomOutgoingEncryptedAttachmentWithPaginationTitleBubbleCell.h"
#import "RoomMembershipBubbleCell.h"
#import "RoomMembershipBubbleCellWithPaginationTitleBubbleCell.h"
#import "MXKRoomBubbleTableViewCell+Riot.h"
@@ -281,6 +282,7 @@
[self.bubblesTableView registerClass:RoomEmptyBubbleCell.class forCellReuseIdentifier:RoomEmptyBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomMembershipBubbleCell.class forCellReuseIdentifier:RoomMembershipBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomMembershipBubbleCellWithPaginationTitleBubbleCell.class forCellReuseIdentifier:RoomMembershipBubbleCellWithPaginationTitleBubbleCell.defaultReuseIdentifier];
// Prepare jump to last unread banner
self.jumpToLastUnreadLabel.attributedText = [[NSAttributedString alloc] initWithString:NSLocalizedStringFromTable(@"room_jump_to_first_unread", @"Vector", nil) attributes:@{NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle), NSUnderlineColorAttributeName: kRiotTextColorBlack, NSForegroundColorAttributeName: kRiotTextColorBlack}];
@@ -1547,7 +1549,14 @@
}
else if (bubbleData.tag == RoomBubbleCellDataTagMembership)
{
cellViewClass = RoomMembershipBubbleCell.class;
if (bubbleData.isPaginationFirstBubble)
{
cellViewClass = RoomMembershipBubbleCellWithPaginationTitleBubbleCell.class;
}
else
{
cellViewClass = RoomMembershipBubbleCell.class;
}
}
else if (bubbleData.isIncoming)
{