Disable update prompt on Android

This commit is contained in:
Uriel
2025-09-17 19:32:10 -03:00
parent 9644b00690
commit 73f41f8fc6
3 changed files with 11 additions and 8 deletions

View File

@@ -206,6 +206,11 @@ export default function App() {
}, []);
useEffect(() => {
// don't show update stuff when on android
if (window.__ANDROID__?.isThere()) {
setUpdateFound('');
return;
}
async function fetchReleases() {
const releases = await fetch(
`https://api.github.com/repos/${GH_REPO}/releases`

View File

@@ -66,9 +66,7 @@ export function WidgetsComponent() {
bodyPartsToReset="fingers"
></ResetButton>
<ClearMountingButton></ClearMountingButton>
{(typeof __ANDROID__ === 'undefined' || !__ANDROID__?.isThere()) && (
<BVHButton></BVHButton>
)}
{!window.__ANDROID__?.isThere() && <BVHButton></BVHButton>}
<TrackingPauseButton></TrackingPauseButton>
</div>
<div className="w-full">

10
gui/src/vite-env.d.ts vendored
View File

@@ -4,14 +4,14 @@
declare const __COMMIT_HASH__: string;
declare const __VERSION_TAG__: string;
declare const __GIT_CLEAN__: boolean;
declare const __ANDROID__:
| {
isThere: () => boolean;
}
| undefined;
interface Window {
readonly isTauri: boolean;
readonly __ANDROID__:
| {
isThere: () => boolean;
}
| undefined;
}
declare module 'tailwind-gradient-mask-image';