Open jncosideout opened 1 year ago
This seems to be a bug in the Cordova network plugin. Waistline is definitely checking the connection after the barcode was scanned: https://github.com/davidhealey/waistline/blob/e2aa35b318d70f1d699c26627e391e7b4e7ba74c/www/activities/foodlist/js/foodlist.js#L441
I guess the plugin doesn't update the status while the app is in the background, i.e. while the scanner screen is visible. I don't know if there is a workaround for that.
Description
It looks like the scanner only checks "reachability" status when it starts, and assumes it hasn't changed while the scanner is active.
Reproduction Steps
Expected
App should recognize that the internet connection has been restored in the meantime since scanner was activated, and then perform the network call to fetch food data for the scanned barcode.
Screen Recordings
WiFi
https://github.com/davidhealey/waistline/assets/25991237/5a79be01-74e5-45d2-9dec-c201ffa3439a
Cellular
(*Note that I have "Only show images over Wi-Fi" set to true)
https://github.com/davidhealey/waistline/assets/25991237/e49975fa-53ac-47f6-b1c7-3d6f9b7c8ff9
Environment
App version: 3.6.0 Phone: Moto G7 Power OS: "LineageOS with MicroG" 19.1 (LOS 19.1 is equivalent to stock Android 12)