Skip to content

Commit a527771

Browse files
authored
Update redirection logic
1 parent e7a0c26 commit a527771

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

app/index.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ <h1 class="title">Invalid Link</h1>
379379

380380
// Detect platform
381381
const ua = navigator.userAgent.toLowerCase();
382-
const isAndroid = ua.includes('android');
383382

384383
// The URI to use for opening the app
385384
const openUri = isAndroid ? intentUri : customSchemeUri;
@@ -390,10 +389,13 @@ <h1 class="title">Invalid Link</h1>
390389
openAppBtn.href = openUri;
391390
githubBtn.href = githubUrl;
392391

393-
// Auto-redirect after a short delay
394-
setTimeout(function() {
395-
window.location.href = openUri;
396-
}, 1500);
392+
const isAndroid = ua.includes('android');
393+
394+
if (!isAndroid) {
395+
setTimeout(() => {
396+
window.location.replace(openUri);
397+
}, 1200);
398+
}
397399
})();
398400
</script>
399401
</body>

0 commit comments

Comments
 (0)