Repository navigation
Close the camera editor on Back without leaving the app - #110
Conversation
Android delivers Back as Escape as well, so IsCancel on the Cancel button closed the overlay and the Back that followed found nothing open and sent the app to the background. Handle Escape in the desktop window instead and leave Android to the system Back path, which also needs the pending connect cancelled when the form is detached. Fixes #108
PR Summary by QodoClose the camera editor on Android Back without leaving the app
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1. A closed editor can still connect to a camera
|
Fixes #108.
Back never skipped the dialog: Avalonia on Android delivers Back as
Key.Escapeas well, soIsCancelon the Cancel button closed the form, and the Back that followed 16–50 ms later found no dialog open and sent the app to the background.CameraEditorContentwas the only form withIsCancel, so Discovery, Camera groups and Welcome were not affected.IsCancel; Escape is now handled inCameraEditorWindow, so it works on desktop wherever the focus is. AKeyDownin the content would miss it: with a tap-opened overlay, or when editing on desktop, the focus is outside the form.TryDismissTopmostpath, which does not callFinish, so a pending connect is cancelled when the form is detached.Tested on the Android TV 16 emulator, x86_64 local build:
Desktop Escape checked with a throwaway Avalonia.Headless test, with no focus and with the focus in a text field. Not tested on a real desktop session.
Behaviour change: a separate Esc key on Android no longer closes this form, the same as the other dialogs. Back does.
Not tested: a phone, a physical remote.