Skip to content
Snippets Groups Projects
Commit 890673d8 authored by Danila Fedorin's avatar Danila Fedorin
Browse files

Avoid opening iOS

parent b12f2fb0
Branches
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ import {ServerConsentViewModel} from "./ServerConsentViewModel.js"; ...@@ -23,6 +23,7 @@ import {ServerConsentViewModel} from "./ServerConsentViewModel.js";
import {getLabelForLinkKind} from "../Link.js"; import {getLabelForLinkKind} from "../Link.js";
import {orderedUnique} from "../utils/unique.js"; import {orderedUnique} from "../utils/unique.js";
import {getMatchingPlatforms, selectPlatforms} from "./clients/index.js"; import {getMatchingPlatforms, selectPlatforms} from "./clients/index.js";
import {Platform} from "../Platform.js";
export class OpenLinkViewModel extends ViewModel { export class OpenLinkViewModel extends ViewModel {
constructor(options) { constructor(options) {
...@@ -59,6 +60,11 @@ export class OpenLinkViewModel extends ViewModel { ...@@ -59,6 +60,11 @@ export class OpenLinkViewModel extends ViewModel {
// Client doesn't support deep links. We can't open it. // Client doesn't support deep links. We can't open it.
return false; return false;
} }
} else {
if (this.platforms.includes(Platform.iOS)) {
// Do not try to auto-open links on iOS because of the scary warning.
return false;
}
} }
this.openDefaultViewModel = new AutoOpenViewModel(this.childOptions({ this.openDefaultViewModel = new AutoOpenViewModel(this.childOptions({
client, client,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment