Candidate bug fix for crash opening app from glance

Changed the function parameters on WebhookManager.onReturnRegisterWebhookSensor() to remove the last optional parameter that was causing the error message and this appears to keep the application happy on start up. Looks like an API request race between the glance's last call and the app first call.

Co-Authored-By: __JosephAbbey <me@josephabbey.dev>
This commit is contained in:
Philip Abbey
2025-08-15 12:56:22 +01:00
parent ce81c6af0a
commit 5a0bd98ddb
3 changed files with 56 additions and 63 deletions

View File

@@ -297,7 +297,7 @@ class Settings {
//! @return The augmented HTTP header options.
//
static function augmentHttpHeaders(options as Lang.Dictionary) {
// Use 'm.length() > 0' here in preference to 'm != ""'. The latter makes the app crash on device but not in simulation.
// Use 'm.length() > 0' here in preference to 'm != ""' or '.equals("")'. They make the App crash on device but not in simulation.
if (mUserHeaderName != null && mUserHeaderName.length() > 0 && mUserHeaderValue != null && mUserHeaderValue.length() > 0) {
options[mUserHeaderName] = mUserHeaderValue;
}