fix clients that don't support deeplinking
...from showing a broken continue button
This commit is contained in:
parent
df9087ba17
commit
8a3896eef5
1 changed files with 17 additions and 14 deletions
|
@ -62,20 +62,23 @@ export class ClientViewModel extends ViewModel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const actions = [];
|
const actions = [];
|
||||||
actions.push({
|
const proposedDeepLink = this._client.getDeepLink(this._proposedPlatform, this._link);
|
||||||
label: deepLinkLabel,
|
if (proposedDeepLink) {
|
||||||
url: this._client.getDeepLink(this._proposedPlatform, this._link),
|
actions.push({
|
||||||
primary: true,
|
label: deepLinkLabel,
|
||||||
activated: () => {
|
url: proposedDeepLink,
|
||||||
this._pickClient(this._client);
|
primary: true,
|
||||||
this.preferences.setClient(this._client.id, this._proposedPlatform);
|
activated: () => {
|
||||||
// only show install screen if we tried to open a native deeplink
|
this._pickClient(this._client);
|
||||||
if (this._showOpen && this._proposedPlatform === this._nativePlatform) {
|
this.preferences.setClient(this._client.id, this._proposedPlatform);
|
||||||
this._showOpen = false;
|
// only show install screen if we tried to open a native deeplink
|
||||||
this.emitChange();
|
if (this._showOpen && this._proposedPlatform === this._nativePlatform) {
|
||||||
}
|
this._showOpen = false;
|
||||||
},
|
this.emitChange();
|
||||||
});
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
// show only if there is a preferred instance, and if we don't already link to it in the first button
|
// show only if there is a preferred instance, and if we don't already link to it in the first button
|
||||||
if (hasPreferredWebInstance && this._webPlatform && this._proposedPlatform !== this._webPlatform) {
|
if (hasPreferredWebInstance && this._webPlatform && this._proposedPlatform !== this._webPlatform) {
|
||||||
actions.push({
|
actions.push({
|
||||||
|
|
Loading…
Reference in a new issue