* Update the dataSource label and notify state listeners so the UI can * react without needing a separate subscription. * @param {'live'|'server-simulated'|'reconnecting'|'simulated'} source
(source)
| 386 | * @param {'live'|'server-simulated'|'reconnecting'|'simulated'} source |
| 387 | */ |
| 388 | _setDataSource(source) { |
| 389 | if (source === this._dataSource) return; |
| 390 | this._dataSource = source; |
| 391 | // Re-use the same state-listener channel — listeners receive the |
| 392 | // connection state but can read dataSource via service.dataSource. |
| 393 | for (const cb of this._stateListeners) { |
| 394 | try { cb(this._state); } catch (e) { /* ignore */ } |
| 395 | } |
| 396 | } |
| 397 | |
| 398 | _clearTimers() { |
| 399 | this._stopSimulation(); |
no outgoing calls
no test coverage detected