scan: clear state on modal opening

This commit is contained in:
ardocrat 2024-05-18 14:29:33 +03:00
parent 0765cb8e30
commit eec434ecaa

View file

@ -196,6 +196,7 @@ impl WalletContent {
// Draw button to scan QR code. // Draw button to scan QR code.
View::item_button(ui, View::item_rounding(0, 2, true), SCAN, None, || { View::item_button(ui, View::item_rounding(0, 2, true), SCAN, None, || {
self.qr_scan_result = None; self.qr_scan_result = None;
self.camera_content.clear_state();
// Show QR code scan modal. // Show QR code scan modal.
Modal::new(QR_CODE_SCAN_MODAL) Modal::new(QR_CODE_SCAN_MODAL)
.position(ModalPosition::CenterTop) .position(ModalPosition::CenterTop)