mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-31 01:42:27 +00:00
Ensure url health badges update once cards mount
This commit is contained in:
1 parent
ebcb402569
commit
eb989bee89
1 file changed
+12
-1
@@ -2153,7 +2153,7 @@ class bitvidApp {
|
||||
}
|
||||
|
||||
updateUrlHealthBadge(badgeEl, state, videoId) {
|
||||
if (!badgeEl || !badgeEl.isConnected) {
|
||||
if (!badgeEl) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2161,6 +2161,17 @@ class bitvidApp {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!badgeEl.isConnected) {
|
||||
if (typeof requestAnimationFrame === "function") {
|
||||
requestAnimationFrame(() => {
|
||||
if (badgeEl.isConnected) {
|
||||
this.updateUrlHealthBadge(badgeEl, state, videoId);
|
||||
}
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const status = state?.status || "checking";
|
||||
const message =
|
||||
state?.message ||
|
||||
|
||||
Reference in new issue
Block a user