mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
MXKRoomBubbleCellData: Improve getFirstBubbleComponentWithDisplay and getLastBubbleComponentWithDisplay.
This commit is contained in:
parent
4b2e9bb8ac
commit
5ae11d1744
1 changed files with 6 additions and 7 deletions
|
@ -313,9 +313,8 @@
|
|||
|
||||
@synchronized(bubbleComponents)
|
||||
{
|
||||
for (NSInteger index = 0; index < bubbleComponents.count; index++)
|
||||
for (MXKRoomBubbleComponent *component in bubbleComponents)
|
||||
{
|
||||
MXKRoomBubbleComponent *component = bubbleComponents[index];
|
||||
if (component.attributedTextMessage)
|
||||
{
|
||||
first = component;
|
||||
|
@ -334,12 +333,12 @@
|
|||
|
||||
@synchronized(bubbleComponents)
|
||||
{
|
||||
for (NSInteger index = 0; index < bubbleComponents.count; index++)
|
||||
for (MXKRoomBubbleComponent *component in bubbleComponents.reverseObjectEnumerator)
|
||||
{
|
||||
MXKRoomBubbleComponent *component = bubbleComponents[index];
|
||||
if (component.attributedTextMessage)
|
||||
{
|
||||
lastVisibleComponent = component;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue