Cache health badge state to avoid re-flashing

This commit is contained in:
thePR0M3TH3AN committed 2025-10-09 20:31:40 -04:00
1 parent 96bbeef040
commit e2935c23fd
5 files changed
+536 -21

No files matched your search

+16
View File
@@ -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] : []),