From 913db5131be741a8d2f498b85a426ac2e43cf8c5 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Wed, 8 Feb 2023 13:50:29 -0600 Subject: [PATCH] =?UTF-8?q?Adds=20=E2=80=9CClear=20Cache=E2=80=9D=20descri?= =?UTF-8?q?ption=20to=20Techy=20Things=20section=20footer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AltStore/Settings/SettingsViewController.swift | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/AltStore/Settings/SettingsViewController.swift b/AltStore/Settings/SettingsViewController.swift index 3df54d91..f175aba1 100644 --- a/AltStore/Settings/SettingsViewController.swift +++ b/AltStore/Settings/SettingsViewController.swift @@ -213,7 +213,14 @@ private extension SettingsViewController break case .techyThings: - settingsHeaderFooterView.primaryLabel.text = NSLocalizedString("TECHY THINGS", comment: "") + if isHeader + { + settingsHeaderFooterView.primaryLabel.text = NSLocalizedString("TECHY THINGS", comment: "") + } + else + { + settingsHeaderFooterView.secondaryLabel.text = NSLocalizedString("Free up disk space by removing non-essential data, such as temporary files and backups for uninstalled apps.", comment: "") + } case .credits: settingsHeaderFooterView.primaryLabel.text = NSLocalizedString("CREDITS", comment: "") @@ -493,12 +500,12 @@ extension SettingsViewController { case _ where isSectionHidden(section): return nil case .signIn where self.activeTeam != nil: return nil - case .signIn, .patreon, .appRefresh, .macDirtyCow: + case .signIn, .patreon, .appRefresh, .techyThings, .macDirtyCow: let footerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "HeaderFooterView") as! SettingsHeaderFooterView self.prepare(footerView, for: section, isHeader: false) return footerView - case .account, .credits, .debug, .instructions, .techyThings: return nil + case .account, .credits, .debug, .instructions: return nil } } @@ -526,11 +533,11 @@ extension SettingsViewController case _ where isSectionHidden(section): return 1.0 case .signIn where self.activeTeam != nil: return 1.0 case .account where self.activeTeam == nil: return 1.0 - case .signIn, .patreon, .appRefresh, .macDirtyCow: + case .signIn, .patreon, .appRefresh, .techyThings, .macDirtyCow: let height = self.preferredHeight(for: self.prototypeHeaderFooterView, in: section, isHeader: false) return height - case .account, .credits, .debug, .instructions, .techyThings: return 0.0 + case .account, .credits, .debug, .instructions: return 0.0 } } }