mirror of
https://github.com/smittix/intercept.git
synced 2026-07-19 06:48:11 -07:00
fix: bluetooth no results, audio waveform leak, and mode switch cleanup
- Change 'already_running' to 'already_scanning' status in bluetooth_v2 so frontend recognizes the response and connects the SSE stream - Hide pagerScopePanel and sensorScopePanel in switchMode() to prevent audio waveform bars leaking into other modes - Clear devices Map, pendingDeviceIds Set, and UI in BluetoothMode.destroy() to prevent memory accumulation on repeated mode switches Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -261,7 +261,7 @@ def start_scan():
|
|||||||
# Check if already scanning
|
# Check if already scanning
|
||||||
if scanner.is_scanning:
|
if scanner.is_scanning:
|
||||||
return jsonify({
|
return jsonify({
|
||||||
'status': 'already_running',
|
'status': 'already_scanning',
|
||||||
'scan_status': scanner.get_status().to_dict()
|
'scan_status': scanner.get_status().to_dict()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1784,6 +1784,13 @@ const BluetoothMode = (function() {
|
|||||||
*/
|
*/
|
||||||
function destroy() {
|
function destroy() {
|
||||||
stopEventStream();
|
stopEventStream();
|
||||||
|
devices.clear();
|
||||||
|
pendingDeviceIds.clear();
|
||||||
|
if (deviceContainer) {
|
||||||
|
deviceContainer.innerHTML = '';
|
||||||
|
}
|
||||||
|
const countEl = document.getElementById('btDeviceListCount');
|
||||||
|
if (countEl) countEl.textContent = '0';
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|||||||
@@ -4296,6 +4296,10 @@
|
|||||||
const sensorTimelineContainer = document.getElementById('sensorTimelineContainer');
|
const sensorTimelineContainer = document.getElementById('sensorTimelineContainer');
|
||||||
if (pagerTimelineContainer) pagerTimelineContainer.style.display = mode === 'pager' ? 'block' : 'none';
|
if (pagerTimelineContainer) pagerTimelineContainer.style.display = mode === 'pager' ? 'block' : 'none';
|
||||||
if (sensorTimelineContainer) sensorTimelineContainer.style.display = mode === 'sensor' ? 'block' : 'none';
|
if (sensorTimelineContainer) sensorTimelineContainer.style.display = mode === 'sensor' ? 'block' : 'none';
|
||||||
|
const pagerScopePanel = document.getElementById('pagerScopePanel');
|
||||||
|
if (pagerScopePanel && mode !== 'pager') pagerScopePanel.style.display = 'none';
|
||||||
|
const sensorScopePanel = document.getElementById('sensorScopePanel');
|
||||||
|
if (sensorScopePanel && mode !== 'sensor') sensorScopePanel.style.display = 'none';
|
||||||
const morseScopePanel = document.getElementById('morseScopePanel');
|
const morseScopePanel = document.getElementById('morseScopePanel');
|
||||||
const morseOutputPanel = document.getElementById('morseOutputPanel');
|
const morseOutputPanel = document.getElementById('morseOutputPanel');
|
||||||
if (morseScopePanel && mode !== 'morse') morseScopePanel.style.display = 'none';
|
if (morseScopePanel && mode !== 'morse') morseScopePanel.style.display = 'none';
|
||||||
|
|||||||
Reference in New Issue
Block a user