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
@@ -132,6 +132,7 @@ class RoomContextActionService: NSObject, RoomContextActionServiceProtocol {
func leaveRoom(promptUser: Bool) {
guard promptUser else {
// Only used for declining an invite
self.leaveRoom()
return
}
@@ -141,6 +142,26 @@ class RoomContextActionService: NSObject, RoomContextActionServiceProtocol {
self.delegate?.roomContextActionService(self, presentAlert: self.getLeaveAlertController())
} else {
self.delegate?.roomContextActionService(self, presentAlert: self.leaveAlertController)
Task {
if try await room.isLastOwner() {
await MainActor.run {
let alertController = UIAlertController(title: VectorL10n.error, message: VectorL10n.roomParticipantsLeaveNotAllowedForLastOwnerMsg, preferredStyle: .alert)
alertController.addAction(UIAlertAction(title: VectorL10n.ok, style: .cancel, handler: nil))
self.delegate?.roomContextActionService(self, presentAlert: alertController)
}
} else {
let title = room.isDirect ? VectorL10n.roomParticipantsLeavePromptTitleForDm : VectorL10n.roomParticipantsLeavePromptTitle
let message = room.isDirect ? VectorL10n.roomParticipantsLeavePromptMsgForDm : VectorL10n.roomParticipantsLeavePromptMsg
await MainActor.run {
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert)
alertController.addAction(UIAlertAction(title: VectorL10n.cancel, style: .cancel, handler: nil))
alertController.addAction(UIAlertAction(title: VectorL10n.leave, style: .default, handler: { [weak self] action in
self?.leaveRoom()
}))
self.delegate?.roomContextActionService(self, presentAlert: alertController)
}
}
}
}