Chat: Bug Fix event timestamp is not aligned when username is hidden.

This commit is contained in:
giomfo
2016-01-21 17:57:02 +01:00
parent 660912c170
commit 3cc5487655
23 changed files with 659 additions and 85 deletions
+32 -2
View File
@@ -36,6 +36,8 @@
#import "RoomIncomingTextMsgBubbleCell.h"
#import "RoomIncomingTextMsgWithoutSenderInfoBubbleCell.h"
#import "RoomIncomingTextMsgWithPaginationTitleBubbleCell.h"
#import "RoomIncomingTextMsgWithoutSenderNameBubbleCell.h"
#import "RoomIncomingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.h"
#import "RoomIncomingAttachmentBubbleCell.h"
#import "RoomIncomingAttachmentWithoutSenderInfoBubbleCell.h"
#import "RoomIncomingAttachmentWithPaginationTitleBubbleCell.h"
@@ -43,6 +45,8 @@
#import "RoomOutgoingTextMsgBubbleCell.h"
#import "RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.h"
#import "RoomOutgoingTextMsgWithPaginationTitleBubbleCell.h"
#import "RoomOutgoingTextMsgWithoutSenderNameBubbleCell.h"
#import "RoomOutgoingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.h"
#import "RoomOutgoingAttachmentBubbleCell.h"
#import "RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.h"
#import "RoomOutgoingAttachmentWithPaginationTitleBubbleCell.h"
@@ -83,6 +87,8 @@
[self.bubblesTableView registerClass:RoomIncomingAttachmentBubbleCell.class forCellReuseIdentifier:RoomIncomingAttachmentBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomIncomingAttachmentWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:RoomIncomingAttachmentWithoutSenderInfoBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomIncomingAttachmentWithPaginationTitleBubbleCell.class forCellReuseIdentifier:RoomIncomingAttachmentWithPaginationTitleBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomIncomingTextMsgWithoutSenderNameBubbleCell.class forCellReuseIdentifier:RoomIncomingTextMsgWithoutSenderNameBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomIncomingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.class forCellReuseIdentifier:RoomIncomingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomOutgoingAttachmentBubbleCell.class forCellReuseIdentifier:RoomOutgoingAttachmentBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.defaultReuseIdentifier];
@@ -90,6 +96,8 @@
[self.bubblesTableView registerClass:RoomOutgoingTextMsgBubbleCell.class forCellReuseIdentifier:RoomOutgoingTextMsgBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomOutgoingTextMsgWithPaginationTitleBubbleCell.class forCellReuseIdentifier:RoomOutgoingTextMsgWithPaginationTitleBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomOutgoingTextMsgWithoutSenderNameBubbleCell.class forCellReuseIdentifier:RoomOutgoingTextMsgWithoutSenderNameBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomOutgoingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.class forCellReuseIdentifier:RoomOutgoingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.defaultReuseIdentifier];
// Set room title view
[self setRoomTitleViewClass:RoomTitleView.class];
@@ -327,12 +335,23 @@
{
if (bubbleData.isPaginationFirstBubble)
{
cellViewClass = RoomIncomingTextMsgWithPaginationTitleBubbleCell.class;
if (bubbleData.shouldHideSenderName)
{
cellViewClass = RoomIncomingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.class;
}
else
{
cellViewClass = RoomIncomingTextMsgWithPaginationTitleBubbleCell.class;
}
}
else if (bubbleData.shouldHideSenderInformation)
{
cellViewClass = RoomIncomingTextMsgWithoutSenderInfoBubbleCell.class;
}
else if (bubbleData.shouldHideSenderName)
{
cellViewClass = RoomIncomingTextMsgWithoutSenderNameBubbleCell.class;
}
else
{
cellViewClass = RoomIncomingTextMsgBubbleCell.class;
@@ -361,12 +380,23 @@
{
if (bubbleData.isPaginationFirstBubble)
{
cellViewClass = RoomOutgoingTextMsgWithPaginationTitleBubbleCell.class;
if (bubbleData.shouldHideSenderName)
{
cellViewClass = RoomOutgoingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.class;
}
else
{
cellViewClass = RoomOutgoingTextMsgWithPaginationTitleBubbleCell.class;
}
}
else if (bubbleData.shouldHideSenderInformation)
{
cellViewClass = RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.class;
}
else if (bubbleData.shouldHideSenderName)
{
cellViewClass = RoomOutgoingTextMsgWithoutSenderNameBubbleCell.class;
}
else
{
cellViewClass = RoomOutgoingTextMsgBubbleCell.class;