-
Notifications
You must be signed in to change notification settings - Fork 381
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
Make Multihop feature chip appear if settings or current state say so #7815
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved
There was a problem hiding this 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, 1 unresolved discussion
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift
line 57 at r1 (raw file):
let state: TunnelState var isEnabled: Bool { settings.tunnelMultihopState.isEnabled || state.isMultihop
Since either of these conditions (settings.tunnelMultihopState.isEnabled || settings.daita.isAutomaticRouting
) implies multihop
, there is no need for a computed variable for isMultihop
or for State
as a dependency injection here.
Code snippet:
var isEnabled: Bool {
settings.tunnelMultihopState.isEnabled || settings.daita.isAutomaticRouting
}
Previously, mojganii wrote…
Though if you have DAITA automatic routing enabled but select a relay that has DAITA, will that still enable multihop? I thought that in that case, your traffic will go through just that single relay, in which case a "Multihop" feature chip would be misleading. |
There was a problem hiding this 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, 1 unresolved discussion (waiting on @mojganii)
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift
line 57 at r1 (raw file):
if you have DAITA automatic routing enabled but select a relay that has DAITA, will that still enable multihop?
It will not.
There was a problem hiding this 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, 1 unresolved discussion (waiting on @acb-mv and @buggmagnet)
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift
line 57 at r1 (raw file):
Previously, buggmagnet wrote…
if you have DAITA automatic routing enabled but select a relay that has DAITA, will that still enable multihop?
It will not.
Since there is reliable information about the selected relays, which are filtered in the upper layer by relaySelectorWrapper, it is good enough to determine whether it is multi-hopping or not. Therefore, I retract my comment.
cdcd6c4
to
afe0d56
Compare
The Multihop feature chip has been modified to appear if the settings enable multihop, or if the current tunnel state is multihop (i.e., if this has been enabled due to DAITA)
This change is