fix: Fix an issue about resuming from background on iOS (#888).

This commit is contained in:
vorotamoroz
2026-05-18 12:30:03 +01:00
parent d6bf453a6d
commit a08294ab16
3 changed files with 16 additions and 3 deletions

Submodule src/lib updated: a0af792b48...36b99354f6

View File

@@ -121,7 +121,7 @@ export class ModuleObsidianEvents extends AbstractObsidianModule {
return;
}
const isHidden = document.hidden;
const isHidden = activeWindow.document.hidden;
if (this.isLastHidden === isHidden) {
return;
}
@@ -134,7 +134,7 @@ export class ModuleObsidianEvents extends AbstractObsidianModule {
} else {
// suspend all temporary.
if (this.services.appLifecycle.isSuspended()) return;
if (!this.hasFocus) return;
// Do not block resume by focus state here; visibility recovery should be enough.
await this.services.appLifecycle.onResuming();
await this.services.appLifecycle.onResumed();
}