custom URL scheme: use window.document.href instead of window.open

This commit is contained in:
Nuwan 2024-10-11 11:55:12 +05:30
parent 3db0a30fef
commit 3c3ea6cbba
2 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ const JKNewMusicSession = () => {
//an example URL would be: jamkazam://url=https://www.jamkazam.com/client#/createSession/privacy~2|description~hello|inviteeIds~1,2,3,4
const q = `privacy~${payload.privacy}|description~${payload.description}|inviteeIds~${payload.inviteeIds}`;
const urlScheme = jkCustomUrlScheme('createSession', q);
window.open(urlScheme);
window.location.href = urlScheme;
//history.push('/sessions');
} catch (error) {
toggleAppUnavilableModel();

View File

@ -171,7 +171,7 @@ function JoinSessionButton({ session }) {
await isNativeAppAvailable();
const q = `joinSessionId~${session.id}`;
const urlScheme = jkCustomUrlScheme('findSession', q);
window.open(urlScheme, '_blank');
window.document.href = urlScheme;
return;
} catch (error) {
setNativeAppUnavailable(true);