Avoid opening iOS
This commit is contained in:
parent
b12f2fb074
commit
890673d8ac
1 changed files with 6 additions and 0 deletions
|
@ -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 {
|
||||||
// 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,
|
||||||
|
|
Loading…
Reference in a new issue