From 342048dbf8f7ff4e92ec920cafa943f2532d85d6 Mon Sep 17 00:00:00 2001 From: Mouaz Date: Thu, 10 Aug 2023 12:25:57 +0200 Subject: [PATCH] Fix comments --- .../UI/Settings/MFA/KeySecurityOverviewViewController.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Multisig/UI/Settings/MFA/KeySecurityOverviewViewController.swift b/Multisig/UI/Settings/MFA/KeySecurityOverviewViewController.swift index 2e1d79dae..c0b887003 100644 --- a/Multisig/UI/Settings/MFA/KeySecurityOverviewViewController.swift +++ b/Multisig/UI/Settings/MFA/KeySecurityOverviewViewController.swift @@ -97,9 +97,10 @@ class KeySecurityOverviewViewController: LoadableViewController, UITableViewDele } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let factor = sections[indexPath.section].items[indexPath.row] switch sections[indexPath.section].section { case .enabledFactors(_), .otherFactors(_): - if case let Section.Factor.factor(name, value, image, isDefault, selected) = sections[indexPath.section].items[indexPath.row] { + if case let Section.Factor.factor(name, value, image, isDefault, selected) = factor { let cell = tableView.dequeueCell(SecurityFactorTableViewCell.self, for: indexPath) cell.selectionStyle = .none cell.set(name: name, @@ -111,7 +112,7 @@ class KeySecurityOverviewViewController: LoadableViewController, UITableViewDele return cell } case .info: - if case let Section.Info.info(text, image) = sections[indexPath.section].items[indexPath.row] { + if case let Section.Info.info(text, image) = factor { let cell = tableView.dequeueCell(WarningTableViewCell.self, for: indexPath) cell.selectionStyle = .none cell.set(image: UIImage(named: image)?.withTintColor(.info, renderingMode: .alwaysOriginal),