-
Notifications
You must be signed in to change notification settings - Fork 369
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
Fix connection view background in iOS15 #7479
Fix connection view background in iOS15 #7479
Conversation
a3bef8f
to
37c6978
Compare
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.
Don't think my review should hold much authority, but the code seems sane and this runs just fine on my myriad of emulators.
Reviewed 2 of 2 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.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @rablador)
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionView.swift
line 28 at r1 (raw file):
.showIf(connectionViewModel.showsActivityIndicator) ZStack {
ZStack can be removed since it only contains one view. Move padding and radius modifier to VStack (order of modifiers is important)
37c6978
to
ad41168
Compare
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: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @pinkisemils and @SteffenErn)
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionView.swift
line 28 at r1 (raw file):
Previously, SteffenErn (Steffen Ernst) wrote…
ZStack can be removed since it only contains one view. Move padding and radius modifier to VStack (order of modifiers is important)
Done.
ios/MullvadVPN/View controllers/Tunnel/TunnelViewController.swift
line 66 at r2 (raw file):
super.init(nibName: nil, bundle: nil)
Not needed anymore.
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: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @pinkisemils and @SteffenErn)
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionView.swift
line 28 at r1 (raw file):
Previously, SteffenErn (Steffen Ernst) wrote…
ZStack can be removed since it only contains one view. Move padding and radius modifier to VStack (order of modifiers is important)
it can be reduced to :
Code snippet:
var body: some View {
Spacer()
.accessibilityIdentifier(AccessibilityIdentifier.connectionView.asString)
VStack(alignment: .leading, spacing: 0) {
HeaderView(viewModel: connectionViewModel, isExpanded: $isExpanded)
.padding(.bottom, headerViewBottomPadding)
DetailsContainer(
connectionViewModel: connectionViewModel,
indicatorsViewModel: indicatorsViewModel,
isExpanded: $isExpanded
)
.showIf(connectionViewModel.showConnectionDetails)
ButtonPanel(viewModel: connectionViewModel, action: action)
.padding(.top, 16)
}
.padding(16.0)
.background(BlurView(style: .dark))
.cornerRadius(12)
// Some spacing to avoid overlap with the map legal link.
.padding(EdgeInsets(top: 16, leading: 16, bottom: 24, trailing: 16))
.onChange(of: isExpanded) { _ in
onContentUpdate?()
}
.onReceive(connectionViewModel.combinedState) { _, _ in
// Only update expanded state when connections details should be hidden.
// This will contract the view on eg. disconnect, but leave it as-is on
// eg. connect.
if !connectionViewModel.showConnectionDetails {
isExpanded = false
return
}
onContentUpdate?()
}
}
ad41168
to
378e026
Compare
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: 1 of 4 files reviewed, 3 unresolved discussions (waiting on @pinkisemils and @SteffenErn)
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionView.swift
line 28 at r1 (raw file):
Previously, mojganii wrote…
it can be reduced to :
Done.
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionViewViewModel.swift
line 29 at r3 (raw file):
@Published private(set) var tunnelStatus: TunnelStatus @Published var outgoingConnectionInfo: OutgoingConnectionInfo? @Published var showsActivityIndicator = false
Cleanup.
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 r3, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions
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, 2 unresolved discussions
378e026
to
ef8ad08
Compare
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: 3 of 4 files reviewed, 2 unresolved discussions (waiting on @SteffenErn)
ef8ad08
to
58f13dd
Compare
The blurred background in the connection view is transparent in iOS15. We should fix it.
This change is