diff --git a/deltachat-ios/Chat/ChatViewController.swift b/deltachat-ios/Chat/ChatViewController.swift index ff4e46657..68ad5f57a 100644 --- a/deltachat-ios/Chat/ChatViewController.swift +++ b/deltachat-ios/Chat/ChatViewController.swift @@ -1371,7 +1371,8 @@ class ChatViewController: UITableViewController, UITableViewDropDelegate { } private func askToDeleteChat() { - let title = String.localized(stringID: "ask_delete_chat", parameter: 1) + let chat = dcContext.getChat(chatId: chatId) + let title = String.localizedStringWithFormat(String.localized("ask_delete_named_chat"), chat.name) confirmationAlert(title: title, actionTitle: String.localized("delete"), actionStyle: .destructive, actionHandler: { [weak self] _ in guard let self else { return } diff --git a/deltachat-ios/Controller/ChatListViewController.swift b/deltachat-ios/Controller/ChatListViewController.swift index 284576e43..4f7543200 100644 --- a/deltachat-ios/Controller/ChatListViewController.swift +++ b/deltachat-ios/Controller/ChatListViewController.swift @@ -746,11 +746,17 @@ class ChatListViewController: UITableViewController { if selected == 0 { return } - let alert = UIAlertController( - title: nil, - message: String.localized(stringID: "ask_delete_chat", parameter: selected), - preferredStyle: .safeActionSheet - ) + + let message: String + if selected == 1, + let chatIds = viewModel?.chatIdsFor(indexPaths: tableView.indexPathsForSelectedRows), + let chatId = chatIds.first { + message = String.localizedStringWithFormat(String.localized("ask_delete_named_chat"), dcContext.getChat(chatId: chatId).name) + } else { + message = String.localized(stringID: "ask_delete_chat", parameter: selected) + } + + let alert = UIAlertController(title: nil, message: message, preferredStyle: .safeActionSheet) alert.addAction(UIAlertAction(title: String.localized("delete"), style: .destructive, handler: { [weak self] _ in guard let self, let viewModel = self.viewModel else { return } viewModel.deleteChats(indexPaths: self.tableView.indexPathsForSelectedRows)