Avoid opening iOS

This commit is contained in:
Danila Fedorin 2021-09-02 11:22:42 -07:00
parent b12f2fb074
commit 890673d8ac

View file

@ -23,6 +23,7 @@ import {ServerConsentViewModel} from "./ServerConsentViewModel.js";
import {getLabelForLinkKind} from "../Link.js";
import {orderedUnique} from "../utils/unique.js";
import {getMatchingPlatforms, selectPlatforms} from "./clients/index.js";
import {Platform} from "../Platform.js";
export class OpenLinkViewModel extends ViewModel {
constructor(options) {
@ -59,6 +60,11 @@ export class OpenLinkViewModel extends ViewModel {
// Client doesn't support deep links. We can't open it.
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({
client,