MCPcopy Create free account
hub / github.com/corecoding/Vitals / _removeMissingHotSensors

Method _removeMissingHotSensors

extension.js:468–483  ·  view source on GitHub ↗
(hotSensors)

Source from the content-addressed store, hash-verified

466 }
467
468 _removeMissingHotSensors(hotSensors) {
469 for (let i = hotSensors.length - 1; i >= 0; i--) {
470 let sensor = hotSensors[i];
471
472 // make sure default icon (if any) stays visible
473 if (sensor == '_default_icon_') continue;
474
475 // removes sensors that are no longer available
476 if (!this._sensorMenuItems[sensor]) {
477 hotSensors.splice(i, 1);
478 this._removeHotItem(sensor);
479 }
480 }
481
482 return hotSensors;
483 }
484
485 _saveHotSensors(hotSensors) {
486 // removes any sensors that may not currently be available

Callers 1

_saveHotSensorsMethod · 0.95

Calls 1

_removeHotItemMethod · 0.95

Tested by

no test coverage detected