Skip to content

Release 2.0.5

Compare
Choose a tag to compare
@hirbod hirbod released this 15 Dec 18:51
· 7 commits to main since this release

[2.0.5](v2.0.4...v2.0.5) (2024-12-15)

Fixes (Android)

Turns out Android is, once again, a real PITA. The VolumeKeyListener was initially registered on the rootView, which somehow gets removed when you background the app and return. I changed the listener to the contentView, but this broke functionality when opening a modal. To address this, I updated the listener to attach to the correct view, which worked fine—until an input field was focused.

To handle this edge case, I added a tree observer to detect when an input is focused and when that focus is lost, allowing the listener to be restored by reassigning the appropriate window focus.

I believe this is now a reliable and functional solution. The tradeoff—volume button listeners not working when a dialog (alert) or input is focused—should be acceptable and not interfere with most app behaviors.