Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove explanatory text for Direct only in settings #7044

Conversation

rablador
Copy link
Contributor

@rablador rablador commented Oct 22, 2024


This change is Reviewable

@rablador rablador added the iOS Issues related to iOS label Oct 22, 2024
@rablador rablador self-assigned this Oct 22, 2024
Copy link

linear bot commented Oct 22, 2024

pinkisemils
pinkisemils previously approved these changes Oct 23, 2024
Copy link
Collaborator

@pinkisemils pinkisemils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Collaborator

@mojganii mojganii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @rablador)


ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift line 139 at r1 (raw file):

    }

    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {

we can remove all three functions when we don't have footer anymore.

Code snippet:

    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
        UITableView.automaticDimension
    }

    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
        nil
    }

    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
        0
    }

ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift line 175 at r1 (raw file):

            snapshot.appendSections([.daita])
            snapshot.appendItems([.daita], toSection: .daita)
            snapshot.appendItems([.daitaDirectOnly], toSection: .daita)

both can be replace by one :

Code snippet:

snapshot.appendItems([.daita,.daitaDirectOnly], toSection: .daita)

Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @mojganii)


ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift line 139 at r1 (raw file):

Previously, mojganii wrote…

we can remove all three functions when we don't have footer anymore.

The header function can indeed be removed, but unfortunately not the footer ones. Apple adds default section spacing that we don't want.
Simulator Screenshot - iPhone 16 Pro - 2024-10-23 at 11.25.31.png


ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift line 175 at r1 (raw file):

Previously, mojganii wrote…

both can be replace by one :

Done.

@rablador rablador force-pushed the remove-explanatory-text-for-_direct-only__smart-routing_-in-ios-895 branch 2 times, most recently from 45ae3a0 to 16cc72b Compare October 23, 2024 09:38
Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @mojganii and @pinkisemils)


ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift line 139 at r1 (raw file):

Previously, rablador (Jon Petersson) wrote…

The header function can indeed be removed, but unfortunately not the footer ones. Apple adds default section spacing that we don't want.
Simulator Screenshot - iPhone 16 Pro - 2024-10-23 at 11.25.31.png

Oh, but we can of course remedy this by setting footer height on the tableview itself. Se tableView.sectionFooterHeight = 0 above.

@pinkisemils pinkisemils force-pushed the remove-explanatory-text-for-_direct-only__smart-routing_-in-ios-895 branch from 16cc72b to 22f7568 Compare October 23, 2024 10:13
@pinkisemils pinkisemils merged commit 3810488 into main Oct 23, 2024
9 of 10 checks passed
@pinkisemils pinkisemils deleted the remove-explanatory-text-for-_direct-only__smart-routing_-in-ios-895 branch October 23, 2024 10:14
Copy link
Collaborator

@mojganii mojganii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @pinkisemils)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS Issues related to iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants