mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-03-30 17:23:43 -04:00
clear response if range goes back to null
I don't think this ever happens, but just in case, it'd be confusing if the list didn't clear.
This commit is contained in:
parent
718a9a5dc8
commit
9d0a48ba00
@ -62,13 +62,15 @@ const VideoList = ({
|
|||||||
}
|
}
|
||||||
setResponse(r);
|
setResponse(r);
|
||||||
};
|
};
|
||||||
if (range90k != null) {
|
if (range90k !== null) {
|
||||||
doFetch(abort.signal, range90k);
|
doFetch(abort.signal, range90k);
|
||||||
const timeout = setTimeout(() => setShowLoading(true), 1000);
|
const timeout = setTimeout(() => setShowLoading(true), 1000);
|
||||||
return () => {
|
return () => {
|
||||||
abort.abort();
|
abort.abort();
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
setResponse(null);
|
||||||
}
|
}
|
||||||
}, [range90k, snackbars, stream]);
|
}, [range90k, snackbars, stream]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user