From c0ac9af27ebb7761c23e0f5ceebffd14b84dd0ed Mon Sep 17 00:00:00 2001 From: Marten Rebane <54431068+martenrebane@users.noreply.github.com> Date: Wed, 3 Jan 2024 17:34:32 +0200 Subject: [PATCH] Fixes --- MoppApp/MoppApp/SettingsTSACertCell.swift | 4 ++-- MoppApp/MoppApp/SettingsViewController.swift | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/MoppApp/MoppApp/SettingsTSACertCell.swift b/MoppApp/MoppApp/SettingsTSACertCell.swift index 9226bf5a..16b04b7f 100644 --- a/MoppApp/MoppApp/SettingsTSACertCell.swift +++ b/MoppApp/MoppApp/SettingsTSACertCell.swift @@ -91,7 +91,7 @@ class SettingsTSACertCell: UITableViewCell { } func populate() { - self.certificate = TSACertUtil.getCertificate() + self.certificate = CertUtil.getCertificate(folder: SettingsTSACertCell.tsaFileFolder, fileName: DefaultsHelper.tsaCertFileName ?? "") updateUI() } @@ -128,7 +128,7 @@ class SettingsTSACertCell: UITableViewCell { } func removeCertificate() { - TSACertUtil.removeCertificate() + CertUtil.removeCertificate(folder: SettingsTSACertCell.tsaFileFolder, fileName: DefaultsHelper.tsaCertFileName ?? "") certificate = nil updateUI() } diff --git a/MoppApp/MoppApp/SettingsViewController.swift b/MoppApp/MoppApp/SettingsViewController.swift index a67f843b..e7c432d1 100644 --- a/MoppApp/MoppApp/SettingsViewController.swift +++ b/MoppApp/MoppApp/SettingsViewController.swift @@ -116,6 +116,7 @@ class SettingsViewController: MoppViewController { kind: .sivaCert, title: L(.settingsSivaServiceTitle), placeholderText: NSAttributedString(string: L(.settingsSivaServiceTitle)), + value: ""), Field( id: .resetSettings, kind: .resetButton, @@ -345,9 +346,9 @@ extension SettingsViewController: SettingsResetCellDelegate { } } -extension SettingsViewController: SettingsFieldCellDelegate { - func didEndEditingField(_ fieldId: SettingsViewController.FieldId, with value:String) { - switch fieldId { +extension SettingsViewController: SettingsCellDelegate { + func didStartEditingField(_ field: FieldId, _ indexPath: IndexPath) { + switch field { case .rpuuid: currentlyEditingCell = indexPath break