refactor: migrate to shell-env and custom desktop notifications bridge

This commit is contained in:
Mohamed Boudra
2026-03-13 12:26:14 +07:00
parent ee8a81d2e1
commit 013f573cff
19 changed files with 436 additions and 531 deletions
+22
View File
@@ -0,0 +1,22 @@
import { AppState, Platform } from "react-native";
export function getIsAppActivelyVisible(
appState: string = AppState.currentState
): boolean {
if (appState !== "active") {
return false;
}
if (Platform.OS !== "web") {
return true;
}
const documentVisible =
typeof document === "undefined" || document.visibilityState === "visible";
const windowFocused =
typeof document === "undefined" ||
typeof document.hasFocus !== "function" ||
document.hasFocus();
return documentVisible && windowFocused;
}