feat: change leave room info (MESSENGER-6526)

This commit is contained in:
JanNiklas Grabowski
2024-09-27 11:00:03 +02:00
parent 384bebc921
commit 617d658d99
7 changed files with 24 additions and 3 deletions
@@ -204,9 +204,14 @@ class RoomContextActionService: NSObject, RoomContextActionServiceProtocol {
}()
private func getLeaveAlertController() -> UIAlertController {
if LeaveRoomHelper.canLeaveRoom(self.session, self.room) {
if LeaveRoomHelper.canLeaveRoom(self.session, self.room) {
var message = ""
if LeaveRoomHelper.isOnlyMember(self.room) {
message = BWIL10n.roomParticipantsLeaveAndDeletePromptMsg
} else {
message = self.isRoomDirect ? VectorL10n.roomParticipantsLeavePromptMsgForDm : VectorL10n.roomParticipantsLeavePromptMsg
}
let title = self.isRoomDirect ? VectorL10n.roomParticipantsLeavePromptTitleForDm : VectorL10n.roomParticipantsLeavePromptTitle
let message = self.isRoomDirect ? VectorL10n.roomParticipantsLeavePromptMsgForDm : VectorL10n.roomParticipantsLeavePromptMsg
let controller = UIAlertController(title: title, message: message, preferredStyle: .alert)