guardianproject / orbot

The Github home of Orbot: Tor on Android (Also available on gitlab!)
https://gitlab.com/guardianproject/orbot
Other
2.27k stars 338 forks source link

Fix IllegalStateException on app exit #1152

Closed meenbeese closed 4 months ago

meenbeese commented 5 months ago

This PR introduces a safeguard in the app’s UI update logic to prevent IllegalStateException by ensuring that the ConnectFragment is attached to a context before performing any layout changes. It refines the condition checks within the when statement to include a context check alongside the existing isAdded check, thus improving stability during state transitions.

Tested on Pixel 8 API 34.

Fixes #907

bitmold commented 4 months ago

Great thanks