diff options
| -rw-r--r-- | ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift | 9 | ||||
| -rw-r--r-- | ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift b/ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift index 59219e6205..3006be583b 100644 --- a/ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift +++ b/ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift @@ -155,7 +155,7 @@ final class SettingsDataSource: UITableViewDiffableDataSource<SettingsDataSource return switch sectionIdentifier { case .main: - 0 + interactor.deviceState.isLoggedIn ? 0 : UITableView.automaticDimension case .daita, .version, .problemReport: UITableView.automaticDimension } @@ -173,7 +173,6 @@ final class SettingsDataSource: UITableViewDiffableDataSource<SettingsDataSource contentConfiguration.text = sectionFooterText headerView.contentConfiguration = contentConfiguration -// headerView.directionalLayoutMargins = UIMetrics.SettingsCell.apiAccessInsetLayoutMargins return headerView } @@ -210,7 +209,11 @@ final class SettingsDataSource: UITableViewDiffableDataSource<SettingsDataSource private func updateDataSnapshot() { var snapshot = NSDiffableDataSourceSnapshot<Section, Item>() - snapshot.appendSections([.daita, .main]) + if interactor.deviceState.isLoggedIn { + snapshot.appendSections([.daita]) + } + + snapshot.appendSections([.main]) if interactor.deviceState.isLoggedIn { snapshot.appendItems([.daita], toSection: .daita) diff --git a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift index 4113ca8660..2aa5f6dd56 100644 --- a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift +++ b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift @@ -374,7 +374,7 @@ final class VPNSettingsDataSource: UITableViewDiffableDataSource< return switch sectionIdentifier { // 0 due to there already being a separator between .dnsSettings and .ipOverrides. case .dnsSettings: 0 - case .ipOverrides, .quantumResistance: UIMetrics.TableView.sectionSpacing + case .ipOverrides, .quantumResistance: UITableView.automaticDimension default: 0.5 } } |
