mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 18:42:47 +02:00
Merge pull request #2564 from vector-im/riot_2538
BF: Quick reactions menu hide time and user display name
This commit is contained in:
@@ -80,6 +80,10 @@ typedef NS_ENUM(NSInteger, RoomBubbleCellDataTag)
|
||||
*/
|
||||
- (void)updateAdditionalContentHeightIfNeeded;
|
||||
|
||||
/**
|
||||
The index of the first visible component. NSNotFound by default.
|
||||
*/
|
||||
- (NSInteger)firstVisibleComponentIndex;
|
||||
|
||||
#pragma mark - Show all reactions
|
||||
|
||||
|
||||
@@ -277,6 +277,31 @@ static NSAttributedString *timestampVerticalWhitespace = nil;
|
||||
return currentAttributedTextMsg;
|
||||
}
|
||||
|
||||
- (NSInteger)firstVisibleComponentIndex
|
||||
{
|
||||
__block NSInteger firstVisibleComponentIndex = NSNotFound;
|
||||
|
||||
if (self.attachment && self.bubbleComponents.count)
|
||||
{
|
||||
firstVisibleComponentIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
[self.bubbleComponents enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
|
||||
MXKRoomBubbleComponent *component = (MXKRoomBubbleComponent*)obj;
|
||||
|
||||
if (component.attributedTextMessage)
|
||||
{
|
||||
firstVisibleComponentIndex = idx;
|
||||
*stop = YES;
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
return firstVisibleComponentIndex;
|
||||
}
|
||||
|
||||
- (void)refreshBubbleComponentsPosition
|
||||
{
|
||||
// CAUTION: This method must be called on the main thread.
|
||||
|
||||
@@ -5177,7 +5177,7 @@
|
||||
if (bubbleComponents.count > 0)
|
||||
{
|
||||
NSInteger selectedComponentIndex = foundComponentIndex != NSNotFound ? foundComponentIndex : 0;
|
||||
bubbleComponentFrame = [roomBubbleTableViewCell componentFrameInTableViewForIndex:selectedComponentIndex];
|
||||
bubbleComponentFrame = [roomBubbleTableViewCell surroundingFrameInTableViewForComponentIndex:selectedComponentIndex];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user