Fixup postinstall message if app link is clicked
This commit is contained in:
@@ -77,9 +77,26 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
$scope.view = view;
|
||||
};
|
||||
|
||||
$scope.showPostInstall = function () {
|
||||
if (!$scope.app.manifest.postInstallMessage) return;
|
||||
$('#postInstallModal').modal('show');
|
||||
$scope.postInstallMessage = {
|
||||
confirmed: false,
|
||||
openApp: false,
|
||||
|
||||
show: function (openApp) {
|
||||
$scope.postInstallMessage.confirmed = false;
|
||||
$scope.postInstallMessage.openApp = !!openApp;
|
||||
|
||||
if (!$scope.app.manifest.postInstallMessage) return;
|
||||
$('#postInstallModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
if (!$scope.postInstallMessage.confirmed) return;
|
||||
|
||||
$scope.app.pendingPostInstallConfirmation = false;
|
||||
delete localStorage['confirmPostInstall_' + $scope.app.id];
|
||||
|
||||
$('#postInstallModal').modal('hide');
|
||||
}
|
||||
};
|
||||
|
||||
$scope.display = {
|
||||
|
||||
Reference in New Issue
Block a user