From b859d64174245fe3b9651952ba4a199801928568 Mon Sep 17 00:00:00 2001 From: manuroe Date: Fri, 7 Jul 2017 17:47:58 +0200 Subject: [PATCH] MELS: Use normal membership cell for single membership event --- Riot/ViewController/RoomViewController.m | 28 +++++++++++++----------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/Riot/ViewController/RoomViewController.m b/Riot/ViewController/RoomViewController.m index 83efa0de1..c27249d65 100644 --- a/Riot/ViewController/RoomViewController.m +++ b/Riot/ViewController/RoomViewController.m @@ -1553,27 +1553,29 @@ } else if (bubbleData.tag == RoomBubbleCellDataTagMembership) { - if (bubbleData.isPaginationFirstBubble) + if (bubbleData.collapsed) { - cellViewClass = RoomMembershipBubbleCellWithPaginationTitleBubbleCell.class; - } - else - { - if (bubbleData.collapsed) + if (bubbleData.nextCollapsableCellData) { cellViewClass = RoomMembershipCollapsedBubbleCell.class; } - else if (bubbleData.collapsedAttributedTextMessage) - { - // The cell (and its serie) is not collapsed but this cell is the first - // of the serie. So, use the cell with the "collapse" button - cellViewClass = RoomMembershipExpandedBubbleCell.class; - } else { - cellViewClass = RoomMembershipBubbleCell.class; + // Use a normal membership cell for a single membership event + bubbleData.attributedTextMessage = bubbleData.attributedTextMessageBackup; + cellViewClass = bubbleData.isPaginationFirstBubble ? RoomMembershipBubbleCellWithPaginationTitleBubbleCell.class : RoomMembershipBubbleCell.class; } } + else if (bubbleData.collapsedAttributedTextMessage) + { + // The cell (and its serie) is not collapsed but this cell is the first + // of the serie. So, use the cell with the "collapse" button. + cellViewClass = RoomMembershipExpandedBubbleCell.class; + } + else + { + cellViewClass = bubbleData.isPaginationFirstBubble ? RoomMembershipBubbleCellWithPaginationTitleBubbleCell.class : RoomMembershipBubbleCell.class; + } } else if (bubbleData.isIncoming) {