diff --git a/public/views/modals/glidera-tx-details.html b/public/views/modals/glidera-tx-details.html
index fb379ec58..56b1abe97 100644
--- a/public/views/modals/glidera-tx-details.html
+++ b/public/views/modals/glidera-tx-details.html
@@ -30,7 +30,7 @@
-
+
-
Status
diff --git a/src/js/controllers/buyGlidera.js b/src/js/controllers/buyGlidera.js
index 155e4a883..b6777f326 100644
--- a/src/js/controllers/buyGlidera.js
+++ b/src/js/controllers/buyGlidera.js
@@ -9,6 +9,8 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
this.success = null;
this.loading = null;
+ window.ignoreMobilePause = true;
+
var otherWallets = function(testnet) {
var network = testnet ? 'testnet' : 'livenet';
return lodash.filter(profileService.getWallets(network), function(w) {
diff --git a/src/js/controllers/glidera.js b/src/js/controllers/glidera.js
index 87024f2e4..df876cf9a 100644
--- a/src/js/controllers/glidera.js
+++ b/src/js/controllers/glidera.js
@@ -1,7 +1,9 @@
'use strict';
angular.module('copayApp.controllers').controller('glideraController',
- function($scope, $timeout, $modal, profileService, configService, storageService, glideraService, isChromeApp, animationService) {
+ function($rootScope, $scope, $timeout, $modal, profileService, configService, storageService, glideraService, isChromeApp, animationService, lodash) {
+
+ window.ignoreMobilePause = true;
this.getAuthenticateUrl = function() {
return glideraService.getOauthCodeUrl();
@@ -35,6 +37,7 @@ angular.module('copayApp.controllers').controller('glideraController',
};
this.openTxModal = function(token, tx) {
+ $rootScope.modalOpened = true;
var self = this;
var config = configService.getSync().wallet.settings;
var fc = profileService.focusedClient;
@@ -48,9 +51,9 @@ angular.module('copayApp.controllers').controller('glideraController',
$scope.tx = tx;
});
- $scope.cancel = function() {
+ $scope.cancel = lodash.debounce(function() {
$modalInstance.dismiss('cancel');
- };
+ }, 0, 1000);
};
@@ -60,7 +63,13 @@ angular.module('copayApp.controllers').controller('glideraController',
controller: ModalInstanceCtrl,
});
+ var disableCloseModal = $rootScope.$on('closeModal', function() {
+ modalInstance.dismiss('cancel');
+ });
+
modalInstance.result.finally(function() {
+ $rootScope.modalOpened = false;
+ disableCloseModal();
var m = angular.element(document.getElementsByClassName('reveal-modal'));
m.addClass(animationService.modalAnimated.slideOutRight);
});
diff --git a/src/js/controllers/sellGlidera.js b/src/js/controllers/sellGlidera.js
index 616892aa7..cbae3f8f3 100644
--- a/src/js/controllers/sellGlidera.js
+++ b/src/js/controllers/sellGlidera.js
@@ -14,6 +14,8 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
this.currentFeeLevel = config.wallet.settings.feeLevel || 'normal';
var fc;
+ window.ignoreMobilePause = true;
+
var otherWallets = function(testnet) {
var network = testnet ? 'testnet' : 'livenet';
return lodash.filter(profileService.getWallets(network), function(w) {
diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js
index c27076b7a..e1edca494 100644
--- a/src/js/controllers/walletHome.js
+++ b/src/js/controllers/walletHome.js
@@ -3,6 +3,7 @@
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $timeout, $filter, $modal, $log, notification, txStatus, isCordova, profileService, lodash, configService, rateService, storageService, bitcore, isChromeApp, gettext, gettextCatalog, nodeWebkit, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService) {
var self = this;
+ window.ignoreMobilePause = false;
$rootScope.hideMenuBar = false;
$rootScope.wpInputFocused = false;
var config = configService.getSync();
diff --git a/src/js/init.js b/src/js/init.js
index 9c6b29c7b..3bcc05d45 100644
--- a/src/js/init.js
+++ b/src/js/init.js
@@ -45,7 +45,9 @@ angular.element(document).ready(function() {
}, 100);
}
setTimeout(function() {
- window.ignoreMobilePause = false;
+ var loc = window.location;
+ var ignoreMobilePause = loc.toString().match(/(glidera|buy|sell)/) ? true : false;
+ window.ignoreMobilePause = ignoreMobilePause;
}, 100);
}, false);