fix(cctv): keep the camera card's bigger view refreshing

An open bigger view now counts as a viewer of the camera's still, so it
keeps refreshing after the layout turns phone and the Cameras sheet is
not the one open. The card releases it in the watcher's cleanup, which
also runs when the card unmounts in the same tick the popup closes.
This commit is contained in:
German Khokhlov committed 2026-11-20 03:35:32 +04:00
1 parent d19ae89630
commit 2c5f9f89f7
5 files changed
+142 -12

No files matched your search

+3 -1
View File
@@ -298,6 +298,8 @@ export function _renderCctvState(state) {
tabShown &&
this.store.previewCards > 0 &&
(!phone || sheet === CONTEXT_SHEET);
// Its bigger view is a popup over the map, shown on any phone sheet.
const popupShown = tabShown && this.store.previewPopups > 0;
if (this._cctvVideo) {
const visible = liveIntent && panelShown;
if (!visible || this._cctvVideoCameraId !== activeId) {
@@ -324,7 +326,7 @@ export function _renderCctvState(state) {
// immediate so navigation never waits on the prior camera's request.
if (
nextSrc &&
(panelShown || cardShown) &&
(panelShown || cardShown || popupShown) &&
(cameraChanged || (!frameLoading && this._frame.currentSrc !== nextSrc))
) {
this._queueCctvFrame(nextSrc, nextCameraId, cameraChanged);