Suspend idle return while the quest complete screen is showing

This commit is contained in:
2026-09-20 18:16:24 -04:00
parent 2180b2fd49
commit 6d87b1e595
2 changed files with 9 additions and 3 deletions
@@ -2670,7 +2670,7 @@ class dn extends A {
}, 6e4), window.addEventListener("pointerdown", this._onActivity, !0), window.addEventListener("touchstart", this._onActivity, !0), window.addEventListener("keydown", this._onActivity, !0), this._armIdle(), this._logView().kind === "complete-day" && this._armCompleteTimer();
}
updated() {
this._logView().kind === "complete-day" ? this._armCompleteTimer() : (this._clearCompleteTimer(), this._countdown = null);
this._logView().kind === "complete-day" ? (this._clearIdle(), this._armCompleteTimer()) : (this._clearCompleteTimer(), this._countdown = null, this._idleTimer === void 0 && this._armIdle());
}
disconnectedCallback() {
this._stopClock(), this._clearIdle(), this._clearConfirmTimer(), this._clearToastTimer(), this._clearCompleteTimer(), window.removeEventListener("pointerdown", this._onActivity, !0), window.removeEventListener("touchstart", this._onActivity, !0), window.removeEventListener("keydown", this._onActivity, !0), super.disconnectedCallback();
@@ -3343,7 +3343,7 @@ class dn extends A {
this._clockTimer !== void 0 && (window.clearInterval(this._clockTimer), this._clockTimer = void 0);
}
_onActivity = () => {
this._armIdle(), this._confirm !== null && this._armConfirmTimer();
this._logView().kind !== "complete-day" && this._armIdle(), this._confirm !== null && this._armConfirmTimer();
};
}
customElements.define("nestquest-quest-log-card", dn);
+7 -1
View File
@@ -1386,10 +1386,14 @@ export class NestQuestQuestLogCard extends LitElement {
protected updated(): void {
if (this._logView().kind === "complete-day") {
this._clearIdle();
this._armCompleteTimer();
} else {
this._clearCompleteTimer();
this._countdown = null;
if (this._idleTimer === undefined) {
this._armIdle();
}
}
}
@@ -2341,7 +2345,9 @@ export class NestQuestQuestLogCard extends LitElement {
}
private _onActivity = (): void => {
this._armIdle();
if (this._logView().kind !== "complete-day") {
this._armIdle();
}
if (this._confirm !== null) {
this._armConfirmTimer();
}