From fe088c2059b9bd0bc72e554a6aad47ab6c3ea255 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sun, 11 Aug 2024 22:23:04 +0200 Subject: [PATCH] use 'selectedCount' as more verbose variable name --- deltachat-ios/Controller/ChatListViewController.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deltachat-ios/Controller/ChatListViewController.swift b/deltachat-ios/Controller/ChatListViewController.swift index 4f7543200..a615d97d6 100644 --- a/deltachat-ios/Controller/ChatListViewController.swift +++ b/deltachat-ios/Controller/ChatListViewController.swift @@ -742,18 +742,18 @@ class ChatListViewController: UITableViewController { } private func showDeleteMultipleChatConfirmationAlert() { - let selected = tableView.indexPathsForSelectedRows?.count ?? 0 - if selected == 0 { + let selectedCount = tableView.indexPathsForSelectedRows?.count ?? 0 + if selectedCount == 0 { return } let message: String - if selected == 1, + if selectedCount == 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) + message = String.localized(stringID: "ask_delete_chat", parameter: selectedCount) } let alert = UIAlertController(title: nil, message: message, preferredStyle: .safeActionSheet)