Skip to content

Commit 0a80774

Browse files
committed
unstatusify redirects
1 parent 5abee4f commit 0a80774

1 file changed

Lines changed: 18 additions & 10 deletions

File tree

‎src/vector/index.js‎

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -251,20 +251,28 @@ async function loadApp() {
251251

252252
if (!preventRedirect) {
253253
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
254-
window.location = "https://status.im/join-riot.html";
255-
return;
256-
/*if (confirm(_t("Riot is not supported on mobile web. Install the app?"))) {
257-
window.location = "https://itunes.apple.com/us/app/vector.im/id1083446067";
254+
if (UserSettingsStore.getTheme() === 'status') {
255+
window.location = "https://status.im/join-riot.html";
258256
return;
259-
}*/
257+
}
258+
else {
259+
if (confirm(_t("Riot is not supported on mobile web. Install the app?"))) {
260+
window.location = "https://itunes.apple.com/us/app/vector.im/id1083446067";
261+
return;
262+
}
263+
}
260264
}
261265
else if (/Android/.test(navigator.userAgent)) {
262-
window.location = "https://status.im/join-riot.html";
263-
return;
264-
/*if (confirm(_t("Riot is not supported on mobile web. Install the app?"))) {
265-
window.location = "https://play.google.com/store/apps/details?id=im.vector.alpha";
266+
if (UserSettingsStore.getTheme() === 'status') {
267+
window.location = "https://status.im/join-riot.html";
266268
return;
267-
}*/
269+
}
270+
else {
271+
if (confirm(_t("Riot is not supported on mobile web. Install the app?"))) {
272+
window.location = "https://play.google.com/store/apps/details?id=im.vector.alpha";
273+
return;
274+
}
275+
}
268276
}
269277
}
270278

0 commit comments

Comments
 (0)