mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-25 19:10:49 +02:00
Merge branch 'develop' into mauroromito/fullscreen_mode_2
# Conflicts: # Riot/Modules/Room/RoomViewController.swift
This commit is contained in:
@@ -3234,30 +3234,30 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
{
|
||||
if (bubbleData.isPaginationFirstBubble)
|
||||
{
|
||||
cellIdentifier = RoomTimelineCellIdentifierIncomingVoiceBroadcastWithPaginationTitle;
|
||||
cellIdentifier = RoomTimelineCellIdentifierIncomingVoiceBroadcastPlaybackWithPaginationTitle;
|
||||
}
|
||||
else if (bubbleData.shouldHideSenderInformation)
|
||||
{
|
||||
cellIdentifier = RoomTimelineCellIdentifierIncomingVoiceBroadcastWithoutSenderInfo;
|
||||
cellIdentifier = RoomTimelineCellIdentifierIncomingVoiceBroadcastPlaybackWithoutSenderInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
cellIdentifier = RoomTimelineCellIdentifierIncomingVoiceBroadcast;
|
||||
cellIdentifier = RoomTimelineCellIdentifierIncomingVoiceBroadcastPlayback;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bubbleData.isPaginationFirstBubble)
|
||||
{
|
||||
cellIdentifier = RoomTimelineCellIdentifierOutgoingVoiceBroadcastWithPaginationTitle;
|
||||
cellIdentifier = RoomTimelineCellIdentifierOutgoingVoiceBroadcastPlaybackWithPaginationTitle;
|
||||
}
|
||||
else if (bubbleData.shouldHideSenderInformation)
|
||||
{
|
||||
cellIdentifier = RoomTimelineCellIdentifierOutgoingVoiceBroadcastWithoutSenderInfo;
|
||||
cellIdentifier = RoomTimelineCellIdentifierOutgoingVoiceBroadcastPlaybackWithoutSenderInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
cellIdentifier = RoomTimelineCellIdentifierOutgoingVoiceBroadcast;
|
||||
cellIdentifier = RoomTimelineCellIdentifierOutgoingVoiceBroadcastPlayback;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5112,7 +5112,9 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
[actionItems addObject:@(ComposerCreateActionCamera)];
|
||||
}
|
||||
|
||||
self.composerCreateActionListBridgePresenter = [[ComposerCreateActionListBridgePresenter alloc] initWithActions:actionItems];
|
||||
self.composerCreateActionListBridgePresenter = [[ComposerCreateActionListBridgePresenter alloc] initWithActions:actionItems
|
||||
wysiwygEnabled:RiotSettings.shared.enableWysiwygComposer
|
||||
textFormattingEnabled:RiotSettings.shared.enableWysiwygTextFormatting];
|
||||
self.composerCreateActionListBridgePresenter.delegate = self;
|
||||
[self.composerCreateActionListBridgePresenter presentFrom:self animated:YES];
|
||||
}
|
||||
@@ -5265,7 +5267,7 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
}
|
||||
}
|
||||
|
||||
if ([cell isKindOfClass:MXKRoomBubbleTableViewCell.class])
|
||||
if ([cell isKindOfClass:MXKRoomBubbleTableViewCell.class] && ![cell isKindOfClass:MXKRoomEmptyBubbleTableViewCell.class])
|
||||
{
|
||||
MXKRoomBubbleTableViewCell *roomBubbleTableViewCell = (MXKRoomBubbleTableViewCell*)cell;
|
||||
if (roomBubbleTableViewCell.readMarkerView)
|
||||
@@ -5915,17 +5917,13 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
{
|
||||
if (self.roomDataSource.room)
|
||||
{
|
||||
// Retrieve the unread messages count
|
||||
NSUInteger unreadCount = self.roomDataSource.room.summary.localUnreadEventCount;
|
||||
// Retrieve the unread messages count on the current thread
|
||||
NSUInteger unreadCount = [self.mainSession.store
|
||||
localUnreadEventCount:self.roomDataSource.room.roomId
|
||||
threadId:self.roomDataSource.threadId ?: kMXEventTimelineMain
|
||||
withTypeIn:self.mainSession.unreadEventTypes];
|
||||
|
||||
if (!self.roomDataSource.threadId)
|
||||
{
|
||||
self.scrollToBottomBadgeLabel.text = unreadCount ? [NSString stringWithFormat:@"%lu", unreadCount] : nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.scrollToBottomBadgeLabel.text = nil;
|
||||
}
|
||||
self.scrollToBottomBadgeLabel.text = unreadCount ? [NSString stringWithFormat:@"%lu", unreadCount] : nil;
|
||||
self.scrollToBottomHidden = NO;
|
||||
}
|
||||
else
|
||||
@@ -6523,7 +6521,7 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
if (self.roomDataSource.isLive && !self.roomDataSource.isPeeking && self.roomDataSource.showReadMarker && self.roomDataSource.room.accountData.readMarkerEventId)
|
||||
{
|
||||
UITableViewCell *cell = [self.bubblesTableView visibleCells].firstObject;
|
||||
if ([cell isKindOfClass:MXKRoomBubbleTableViewCell.class])
|
||||
if ([cell isKindOfClass:MXKRoomBubbleTableViewCell.class] && ![cell isKindOfClass:MXKRoomEmptyBubbleTableViewCell.class])
|
||||
{
|
||||
MXKRoomBubbleTableViewCell *roomBubbleTableViewCell = (MXKRoomBubbleTableViewCell*)cell;
|
||||
// Check whether the read marker is inside the first displayed cell.
|
||||
@@ -7450,31 +7448,27 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
|
||||
MXThreadNotificationsCount *notificationsCount = [service notificationsCountForRoom:self.roomDataSource.roomId];
|
||||
|
||||
if (notificationsCount.numberOfHighlightedThreads > 0)
|
||||
[button setImage:[AssetImages.threadsIcon.image vc_resizedWith:kThreadListBarButtonItemImageSize]
|
||||
forState:UIControlStateNormal];
|
||||
button.contentEdgeInsets = kThreadListBarButtonItemContentInsetsNoDot;
|
||||
|
||||
if (notificationsCount.numberOfNotifiedThreads > 0)
|
||||
{
|
||||
[button setImage:AssetImages.threadsIconRedDot.image
|
||||
forState:UIControlStateNormal];
|
||||
button.contentEdgeInsets = kThreadListBarButtonItemContentInsetsDot;
|
||||
}
|
||||
else if (notificationsCount.numberOfNotifiedThreads > 0)
|
||||
{
|
||||
if (ThemeService.shared.isCurrentThemeDark)
|
||||
{
|
||||
[button setImage:AssetImages.threadsIconGrayDotDark.image
|
||||
forState:UIControlStateNormal];
|
||||
}
|
||||
else
|
||||
{
|
||||
[button setImage:AssetImages.threadsIconGrayDotLight.image
|
||||
forState:UIControlStateNormal];
|
||||
}
|
||||
button.contentEdgeInsets = kThreadListBarButtonItemContentInsetsDot;
|
||||
}
|
||||
else
|
||||
{
|
||||
[button setImage:[AssetImages.threadsIcon.image vc_resizedWith:kThreadListBarButtonItemImageSize]
|
||||
forState:UIControlStateNormal];
|
||||
button.contentEdgeInsets = kThreadListBarButtonItemContentInsetsNoDot;
|
||||
BadgeLabel *badgeLabel = [[BadgeLabel alloc] init];
|
||||
badgeLabel.text = [NSString stringWithFormat:@"%lu", notificationsCount.numberOfNotifiedThreads];
|
||||
id<Theme> theme = ThemeService.shared.theme;
|
||||
badgeLabel.font = theme.fonts.caption1SB;
|
||||
badgeLabel.textColor = theme.colors.navigation;
|
||||
badgeLabel.badgeColor = notificationsCount.numberOfHighlightedThreads ? theme.colors.alert : theme.colors.secondaryContent;
|
||||
[button addSubview:badgeLabel];
|
||||
|
||||
[badgeLabel layoutIfNeeded];
|
||||
|
||||
badgeLabel.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
[badgeLabel.bottomAnchor constraintEqualToAnchor:button.centerYAnchor
|
||||
constant:badgeLabel.bounds.size.height - kThreadListBarButtonItemImageSize.height / 6].active = YES;
|
||||
[badgeLabel.leadingAnchor constraintEqualToAnchor:button.centerXAnchor
|
||||
constant:badgeLabel.bounds.size.width + kThreadListBarButtonItemImageSize.width / 6].active = YES;
|
||||
}
|
||||
|
||||
if (replaceIndex == NSNotFound)
|
||||
@@ -8059,6 +8053,11 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)composerCreateActionListBridgePresenterDelegateDidToggleTextFormatting:(ComposerCreateActionListBridgePresenter *)coordinatorBridgePresenter enabled:(BOOL)enabled
|
||||
{
|
||||
[self togglePlainTextMode];
|
||||
}
|
||||
|
||||
- (void)composerCreateActionListBridgePresenterDidDismissInteractively:(ComposerCreateActionListBridgePresenter *)coordinatorBridgePresenter
|
||||
{
|
||||
self.composerCreateActionListBridgePresenter = nil;
|
||||
|
||||
Reference in New Issue
Block a user