chore: Update to FOSS 1.11.31 (MESSENGER-7610)

Merge commit '822cbc5076da248fa7b997a5e3e906b03c4a09f7' into feature/7610_FOSS_Merge_1_11_31

# Conflicts:
#	Config/AppVersion.xcconfig
#	Podfile
#	Podfile.lock
#	README.md
#	Riot/Modules/Common/Recents/RecentsViewController.m
#	Riot/Modules/ContextMenu/Services/RoomContextActionService.swift
#	Riot/Modules/Room/Members/RoomParticipantsViewController.m
#	Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewController.swift
#	fastlane/Fastfile
This commit is contained in:
Frank Rotermund
2025-08-27 07:39:26 +02:00
61 changed files with 1278 additions and 363 deletions
@@ -125,7 +125,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
[tableSearchBar setImage:AssetImages.filterOff.image
forSearchBarIcon:UISearchBarIconSearch
state:UIControlStateNormal];
tableSearchBar.delegate = self;
displayedSectionHeaders = [NSMutableArray array];
@@ -133,7 +133,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
_contextMenuProvider = [RecentCellContextMenuProvider new];
self.contextMenuProvider.serviceDelegate = self;
self.contextMenuProvider.menuProviderDelegate = self;
// Set itself as delegate by default.
self.delegate = self;
}
@@ -151,10 +151,10 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
// Register key backup banner cells
[self.recentsTableView registerNib:SecureBackupBannerCell.nib forCellReuseIdentifier:SecureBackupBannerCell.defaultReuseIdentifier];
// Register key verification banner cells
[self.recentsTableView registerNib:CrossSigningSetupBannerCell.nib forCellReuseIdentifier:CrossSigningSetupBannerCell.defaultReuseIdentifier];
[self.recentsTableView registerClass:SectionHeaderView.class
forHeaderFooterViewReuseIdentifier:SectionHeaderView.defaultReuseIdentifier];
@@ -181,7 +181,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
[self.recentsSearchBar setImage:AssetImages.filterOff.image
forSearchBarIcon:UISearchBarIconSearch
state:UIControlStateNormal];
// Observe user interface theme change.
kThemeServiceDidChangeThemeNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kThemeServiceDidChangeThemeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
@@ -196,7 +196,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
- (void)userInterfaceThemeDidChange
{
[ThemeService.shared.theme applyStyleOnNavigationBar:self.navigationController.navigationBar];
self.activityIndicator.backgroundColor = ThemeService.shared.theme.overlayBackgroundColor;
// Use the primary bg color for the recents table view in plain style.
@@ -204,15 +204,15 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
self.recentsTableView.separatorColor = ThemeService.shared.theme.lineBreakColor;
topview.backgroundColor = ThemeService.shared.theme.headerBackgroundColor;
self.view.backgroundColor = ThemeService.shared.theme.backgroundColor;
[ThemeService.shared.theme applyStyleOnSearchBar:tableSearchBar];
[ThemeService.shared.theme applyStyleOnSearchBar:self.recentsSearchBar];
// Force table refresh
[self.recentsTableView reloadData];
[self.emptyView updateWithTheme:ThemeService.shared.theme];
[self setNeedsStatusBarAppearanceUpdate];
}
@@ -270,7 +270,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
[super viewWillAppear:animated];
isViewVisible = YES;
[self.screenTracker trackScreen];
// Reset back user interactions
self.userInteractionEnabled = YES;
@@ -341,7 +341,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
// the selected room (if any) is highlighted.
[self refreshCurrentSelectedCell:YES];
}
if (self.recentsDataSource)
{
[self refreshRecentsTable];
@@ -913,10 +913,10 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
{
Analytics.shared.joinedRoomTrigger = AnalyticsJoinedRoomTriggerInvite;
}
// Avoid multiple openings of rooms
self.userInteractionEnabled = NO;
// Do not stack views when showing room
ScreenPresentationParameters *presentationParameters = [[ScreenPresentationParameters alloc] initWithRestoreInitialDisplay:NO stackAboveVisibleViews:NO];
@@ -935,7 +935,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
- (void)showRoomPreviewWithData:(RoomPreviewData*)roomPreviewData
{
Analytics.shared.joinedRoomTrigger = AnalyticsJoinedRoomTriggerRoomDirectory;
// Do not stack views when showing room
ScreenPresentationParameters *presentationParameters = [[ScreenPresentationParameters alloc] initWithRestoreInitialDisplay:NO stackAboveVisibleViews:NO sender:nil sourceView:nil];
@@ -1008,7 +1008,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
{
// Retrieve the invited room
MXRoom *invitedRoom = userInfo[kInviteRecentTableViewCellRoomKey];
if (invitedRoom.summary.roomType == MXRoomTypeSpace)
{
// Indicates that spaces are not supported
@@ -1023,7 +1023,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
{
// Retrieve the invited room
MXRoom *invitedRoom = userInfo[kInviteRecentTableViewCellRoomKey];
if (invitedRoom.summary.roomType == MXRoomTypeSpace)
{
// Indicates that spaces are not supported
@@ -1062,7 +1062,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
[super dataSource:dataSource didCellChange:changes];
return;
}
if ([changes isKindOfClass:NSIndexPath.class])
{
NSIndexPath *indexPath = (NSIndexPath *)changes;
@@ -1073,7 +1073,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
TableViewCellWithCollectionView *collectionViewCell = (TableViewCellWithCollectionView *)cell;
[collectionViewCell.collectionView reloadData];
CGRect headerFrame = [self.recentsTableView rectForHeaderInSection:indexPath.section];
UIView *headerView = [self.recentsTableView headerViewForSection:indexPath.section];
UIView *updatedHeaderView = [self.dataSource viewForHeaderInSection:indexPath.section withFrame:headerFrame inTableView:self.recentsTableView];
@@ -1111,7 +1111,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
}
[self showEmptyViewIfNeeded];
if (dataSource.state == MXKDataSourceStateReady)
{
[[NSNotificationCenter defaultCenter] postNotificationName:RecentsViewControllerDataReadyNotification
@@ -1120,109 +1120,120 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
}
#pragma mark - Swipe actions
- (void)leaveEditedRoom
{
if (editedRoomId)
{
NSString *currentRoomId = editedRoomId;
__weak typeof(self) weakSelf = self;
NSString *title, *message;
if ([self.mainSession roomWithRoomId:currentRoomId].isDirect)
{
title = [VectorL10n roomParticipantsLeavePromptTitleForDm];
message = [VectorL10n roomParticipantsLeavePromptMsgForDm];
}
else
{
title = [VectorL10n roomParticipantsLeavePromptTitle];
message = [VectorL10n roomParticipantsLeavePromptMsg];
}
// confirm leave
UIAlertController *leavePrompt = [UIAlertController alertControllerWithTitle:title
message:message
preferredStyle:UIAlertControllerStyleAlert];
[leavePrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
if (weakSelf)
{
typeof(self) self = weakSelf;
self->currentAlert = nil;
}
}]];
[leavePrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n leave]
style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
if (weakSelf)
{
typeof(self) self = weakSelf;
self->currentAlert = nil;
// Check whether the user didn't leave the room yet
// TODO: Handle multi-account
MXRoom *room = [self.mainSession roomWithRoomId:currentRoomId];
if (room)
{
[self startActivityIndicatorWithLabel:[VectorL10n roomParticipantsLeaveProcessing]];
// cancel pending uploads/downloads
// they are useless by now
[MXMediaManager cancelDownloadsInCacheFolder:room.roomId];
// TODO GFO cancel pending uploads related to this room
MXLogDebug(@"[RecentsViewController] Leave room (%@)", room.roomId);
[room leave:^{
if (weakSelf)
{
typeof(self) self = weakSelf;
[self stopActivityIndicator];
[self.userIndicatorStore presentSuccessWithLabel:[VectorL10n roomParticipantsLeaveSuccess]];
// Force table refresh
[self cancelEditionMode:YES];
}
} failure:^(NSError *error) {
MXLogDebug(@"[RecentsViewController] Failed to leave room");
if (weakSelf)
{
typeof(self) self = weakSelf;
// Notify the end user
NSString *userId = room.mxSession.myUser.userId;
[[NSNotificationCenter defaultCenter] postNotificationName:kMXKErrorNotification
object:error
userInfo:userId ? @{kMXKErrorUserIdKey: userId} : nil];
[self stopActivityIndicator];
// Leave editing mode
[self cancelEditionMode:self->isRefreshPending];
}
}];
}
else
{
// Leave editing mode
[self cancelEditionMode:self->isRefreshPending];
}
}
}]];
[leavePrompt mxk_setAccessibilityIdentifier:@"LeaveEditedRoomAlert"];
[self presentViewController:leavePrompt animated:YES completion:nil];
currentAlert = leavePrompt;
MXWeakify(self);
MXRoom *room = [self.mainSession roomWithRoomId:currentRoomId];
__weak typeof(room) weakRoom = room;
[room isLastOwnerWithCompletionHandler:^(BOOL isLastOwner, NSError* error){
if (isLastOwner)
{
UIAlertController *isLastOwnerPrompt = [UIAlertController alertControllerWithTitle:[VectorL10n error]
message:[VectorL10n roomParticipantsLeaveNotAllowedForLastOwnerMsg]
preferredStyle:UIAlertControllerStyleAlert];
[isLastOwnerPrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
self->currentAlert = nil;
}]];
MXStrongifyAndReturnIfNil(self);
dispatch_async(dispatch_get_main_queue(), ^{
[self presentViewController:isLastOwnerPrompt animated:YES completion:nil];
self->currentAlert = isLastOwnerPrompt;
});
}
else
{
NSString *title, *message;
MXStrongifyAndReturnIfNil(self);
if ([self.mainSession roomWithRoomId:currentRoomId].isDirect)
{
title = [VectorL10n roomParticipantsLeavePromptTitleForDm];
message = [VectorL10n roomParticipantsLeavePromptMsgForDm];
}
else
{
title = [VectorL10n roomParticipantsLeavePromptTitle];
message = [VectorL10n roomParticipantsLeavePromptMsg];
}
// confirm leave
UIAlertController *leavePrompt = [UIAlertController alertControllerWithTitle:title
message:message
preferredStyle:UIAlertControllerStyleAlert];
MXWeakify(self);
[leavePrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
self->currentAlert = nil;
}]];
[leavePrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n leave]
style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
self->currentAlert = nil;
// Check whether the user didn't leave the room yet
// TODO: Handle multi-account
if (weakRoom)
{
[self startActivityIndicatorWithLabel:[VectorL10n roomParticipantsLeaveProcessing]];
// cancel pending uploads/downloads
// they are useless by now
[MXMediaManager cancelDownloadsInCacheFolder:weakRoom.roomId];
// TODO GFO cancel pending uploads related to this room
MXLogDebug(@"[RecentsViewController] Leave room (%@)", weakRoom.roomId);
MXWeakify(self);
[weakRoom leave:^{
MXStrongifyAndReturnIfNil(self);
[self stopActivityIndicator];
[self.userIndicatorStore presentSuccessWithLabel:[VectorL10n roomParticipantsLeaveSuccess]];
// Force table refresh
[self cancelEditionMode:YES];
} failure:^(NSError *error) {
MXLogDebug(@"[RecentsViewController] Failed to leave room");
MXStrongifyAndReturnIfNil(self);
// Notify the end user
NSString *userId = room.mxSession.myUser.userId;
[[NSNotificationCenter defaultCenter] postNotificationName:kMXKErrorNotification
object:error
userInfo:userId ? @{kMXKErrorUserIdKey: userId} : nil];
[self stopActivityIndicator];
// Leave editing mode
[self cancelEditionMode:self->isRefreshPending];
}];
}
else
{
// Leave editing mode
[self cancelEditionMode:self->isRefreshPending];
}
}]];
[leavePrompt mxk_setAccessibilityIdentifier:@"LeaveEditedRoomAlert"];
dispatch_async(dispatch_get_main_queue(), ^{
[self presentViewController:leavePrompt animated:YES completion:nil];
self->currentAlert = leavePrompt;
});
}
}];
}
}