mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-03 19:35:28 +00:00
Cache health badge state to avoid re-flashing
This commit is contained in:
1 parent
96bbeef040
commit
e2935c23fd
5 files changed
+536
-21
No files matched your search
@@ -518,6 +518,20 @@ class SubscriptionsManager {
|
||||
? baseView.state.videosMap
|
||||
: new Map();
|
||||
|
||||
const urlHealthCache =
|
||||
app?.urlHealthSnapshots instanceof Map
|
||||
? app.urlHealthSnapshots
|
||||
: baseView?.state?.urlHealthByVideoId instanceof Map
|
||||
? baseView.state.urlHealthByVideoId
|
||||
: new Map();
|
||||
|
||||
const streamHealthCache =
|
||||
app?.streamHealthSnapshots instanceof Map
|
||||
? app.streamHealthSnapshots
|
||||
: baseView?.state?.streamHealthByVideoId instanceof Map
|
||||
? baseView.state.streamHealthByVideoId
|
||||
: new Map();
|
||||
|
||||
const listViewConfig = {
|
||||
document: doc,
|
||||
container,
|
||||
@@ -538,6 +552,8 @@ class SubscriptionsManager {
|
||||
state: {
|
||||
loadedThumbnails,
|
||||
videosMap,
|
||||
urlHealthByVideoId: urlHealthCache,
|
||||
streamHealthByVideoId: streamHealthCache,
|
||||
},
|
||||
utils: {
|
||||
dedupeVideos: (videos) => (Array.isArray(videos) ? [...videos] : []),
|
||||
|
||||
Reference in new issue
Block a user