Skip to content

Commit f4bbd96

Browse files
committed
Refactor dynamic status handling during device connection process
1 parent 2d6c7e2 commit f4bbd96

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

content/wardrive.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4597,8 +4597,7 @@ async function autoSetPowerLevel() {
45974597
deviceModelEl.textContent = "Unknown";
45984598
}
45994599

4600-
// Set persistent status message until user selects power
4601-
setDynamicStatus("Unknown device - select power manually", STATUS_COLORS.warning, true);
4600+
// Don't show status message here - will be shown after connection completes
46024601

46034602
debugLog("[DEVICE MODEL] Auto-power skipped, user must select power manually");
46044603
}
@@ -4616,12 +4615,7 @@ async function connect() {
46164615

46174616
// Set connection bar to "Connecting" - will remain until GPS init completes
46184617
setConnStatus("Connecting", STATUS_COLORS.info);
4619-
// Don't clear dynamic status if it's showing a warning (e.g., "Unknown device" message)
4620-
const currentStatus = document.getElementById("status");
4621-
const isWarning = currentStatus && currentStatus.classList.contains("text-amber-400");
4622-
if (!isWarning) {
4623-
setDynamicStatus("Idle"); // Clear dynamic status only if not showing a warning
4624-
}
4618+
setDynamicStatus("Idle"); // Clear dynamic status
46254619

46264620
try {
46274621
debugLog("[BLE] Opening BLE connection...");

0 commit comments

Comments
 (0)