mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
RoomDataSource: Fix insertRoomCreationIntroCellDataIfNeeded method.
This commit is contained in:
parent
e12db6b592
commit
ce2ef397e1
1 changed files with 4 additions and 6 deletions
|
@ -218,7 +218,7 @@
|
|||
[self.roomDataSourceDelegate roomDataSource:self didUpdateEncryptionTrustLevel:self.encryptionTrustLevel];
|
||||
}
|
||||
|
||||
- (void)roomDidChange
|
||||
- (void)roomDidSet
|
||||
{
|
||||
[self enableRoomCreationIntroCellDisplayIfNeeded];
|
||||
}
|
||||
|
@ -1013,9 +1013,7 @@
|
|||
// Only add room creation intro cell if `bubbles` array contains the room creation event
|
||||
if (roomCreationConfigCellDataIndex != NSNotFound)
|
||||
{
|
||||
RoomBubbleCellData *roomBubbleCellData = self.roomCreationCellData;
|
||||
|
||||
if (!roomBubbleCellData)
|
||||
if (!self.roomCreationCellData)
|
||||
{
|
||||
MXEvent *event = [MXEvent new];
|
||||
MXRoomState *roomState = [MXRoomState new];
|
||||
|
@ -1025,7 +1023,7 @@
|
|||
self.roomCreationCellData = roomBubbleCellData;
|
||||
}
|
||||
|
||||
[bubbles insertObject:roomBubbleCellData atIndex:0];
|
||||
[bubbles insertObject:self.roomCreationCellData atIndex:0];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1038,7 +1036,7 @@
|
|||
- (NSUInteger)roomBubbleDataIndexWithTag:(RoomBubbleCellDataTag)tag
|
||||
{
|
||||
@synchronized(bubbles)
|
||||
{
|
||||
{
|
||||
return [bubbles indexOfObjectPassingTest:^BOOL(id<MXKRoomBubbleCellDataStoring> _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if ([obj isKindOfClass:RoomBubbleCellData.class])
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue