Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [*] Orders: Fixes a bug where the Orders list would not load if an order had a non-integer gift card amount applied to the order (with the Gift Cards extension). [https://github.com/woocommerce/woocommerce-ios/pull/9795]

- [*] My Store: A new button to share the current store is added on the top right of the screen. [https://github.com/woocommerce/woocommerce-ios/pull/9796]
- [*] Mobile Payments: The screen brightness is increased when showing the Scan to Pay view so the QR code can be scanned more easily [https://github.com/woocommerce/woocommerce-ios/pull/9807]

13.7
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import SwiftUI
struct ScanToPayView: View {
let viewModel: ScanToPayViewModel
let onSuccess: (() -> Void)
/// We keep this value to reset the screen brightness after increasing it for better QR readability. Only works on phsycal device.
///
let screenBrightnessAtViewCreation = UIScreen.main.brightness

@Environment(\.dismiss) var dismiss

Expand Down Expand Up @@ -43,6 +46,12 @@ struct ScanToPayView: View {
.padding(Layout.scanToPayBoxOutterPadding)
.frame(maxWidth: .infinity, alignment: .center)
}
.onAppear {
UIScreen.main.brightness = 1.0
}
.onDisappear {
UIScreen.main.brightness = screenBrightnessAtViewCreation
}
}

private struct DoneButton: View {
Expand Down