From 45ae3a0bb8cb696d12515c7bbba613f8f1958745 Mon Sep 17 00:00:00 2001 From: Jon Petersson Date: Tue, 22 Oct 2024 14:17:29 +0200 Subject: [PATCH] Remove explanatory text for Direct only in settings --- .../Settings/SettingsDataSource.swift | 51 ++----------------- 1 file changed, 3 insertions(+), 48 deletions(-) diff --git a/ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift b/ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift index 3006be583bb4..cf4d6f538e67 100644 --- a/ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift +++ b/ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift @@ -44,20 +44,6 @@ final class SettingsDataSource: UITableViewDiffableDataSource CGFloat { - let sectionIdentifier = snapshot().sectionIdentifiers[section] - - return switch sectionIdentifier { - case .main: - interactor.deviceState.isLoggedIn ? 0 : UITableView.automaticDimension - case .daita, .version, .problemReport: - UITableView.automaticDimension - } - } - func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { - let sectionIdentifier = snapshot().sectionIdentifiers[section] - guard let sectionFooterText = sectionIdentifier.sectionFooter else { return nil } - - guard let headerView = tableView - .dequeueReusableView(withIdentifier: HeaderFooterReuseIdentifier.primary) - else { return nil } - - var contentConfiguration = UIListContentConfiguration.mullvadGroupedFooter(tableStyle: .plain) - contentConfiguration.text = sectionFooterText - - headerView.contentConfiguration = contentConfiguration - - return headerView + nil } func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { - let sectionIdentifier = snapshot().sectionIdentifiers[section] - - return switch sectionIdentifier { - case .daita: - UITableView.automaticDimension - case .main, .version, .problemReport: - 0 - } + 0 } // MARK: - Private @@ -211,13 +167,12 @@ final class SettingsDataSource: UITableViewDiffableDataSource