Skip to content

Fix 405 - swap UI feedback responsiveness

Improvement to the UI speed when enabling WiFi, fixes #405 (closed). Previously, enabling "Not visible via WiFi" would cause the toggle to switch on, but the string would stay "Not visible via WiFi" for a few seconds before showing "Setting up WiFi" and then "Visible via WiFi". This was because it was waiting for notifications from the Bonjour service. Now, it only waits for notifications from the WiFi Swap service thing for reasons documented in the code.

Note, this also fixes #413 (closed), which does indeed fix the problem, but as commented in that issue, I may be fixing the symptom and not the problem.

Also, had to apply a fix for a bug introduced with Bluetooth swap, whereby WiFi stuff was done on the UI thread. This is not allowed, so the WiFi stuff happens on a background thread, but the Bluetooth stuff happens on the UI thread. Perhaps in the future we can have a better way to ensure that only one Bluetooth / WiFi swap server is running using locks or something.

Merge request reports