1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

fix some stale screen ref issues in OSD and popout

This commit is contained in:
bbedward
2025-12-05 13:31:57 -05:00
parent 2c48458384
commit 1f00b5f577
2 changed files with 20 additions and 2 deletions

View File

@@ -16,7 +16,15 @@ Singleton {
const currentOSD = currentOSDsByScreen[screenName];
if (currentOSD && currentOSD !== osd) {
currentOSD.hide();
if (typeof currentOSD.hide === "function") {
try {
currentOSD.hide();
} catch (e) {
currentOSDsByScreen[screenName] = null;
}
} else {
currentOSDsByScreen[screenName] = null;
}
}
currentOSDsByScreen[screenName] = osd;