diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 2fe5aa83a8f..b2d34e29d5e 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -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 ----- diff --git a/WooCommerce/Classes/ViewRelated/Orders/ScanToPay/ScanToPayView.swift b/WooCommerce/Classes/ViewRelated/Orders/ScanToPay/ScanToPayView.swift index b255ac0c891..a7186aa5182 100644 --- a/WooCommerce/Classes/ViewRelated/Orders/ScanToPay/ScanToPayView.swift +++ b/WooCommerce/Classes/ViewRelated/Orders/ScanToPay/ScanToPayView.swift @@ -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 @@ -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 {