Not pause the device if user share or send the backup by email

This commit is contained in:
Gustavo Maximiliano Cortez 2015-01-29 16:03:14 -02:00
parent 14531839af
commit 2d11555eab
4 changed files with 10 additions and 1 deletions

View File

@ -155,6 +155,7 @@ angular.module('copayApp.controllers').controller('MoreController',
}; };
$scope.sendWalletBackup = function() { $scope.sendWalletBackup = function() {
window.ignoreMobilePause = true;
window.plugins.toast.showShortCenter('Preparing backup...'); window.plugins.toast.showShortCenter('Preparing backup...');
var name = (w.name || w.id); var name = (w.name || w.id);
var ew = backupService.walletEncrypted(w); var ew = backupService.walletEncrypted(w);

View File

@ -25,6 +25,7 @@ angular.module('copayApp.controllers').controller('ProfileController', function(
}; };
$scope.sendProfileBackup = function() { $scope.sendProfileBackup = function() {
window.ignoreMobilePause = true;
window.plugins.toast.showShortCenter('Preparing backup...'); window.plugins.toast.showShortCenter('Preparing backup...');
var name = $rootScope.iden.fullName; var name = $rootScope.iden.fullName;
var ep = backupService.profileEncrypted($rootScope.iden); var ep = backupService.profileEncrypted($rootScope.iden);

View File

@ -19,7 +19,8 @@ angular.module('copayApp.controllers').controller('ReceiveController',
$scope.shareAddress = function(addr) { $scope.shareAddress = function(addr) {
if (isCordova) { if (isCordova) {
window.plugins.socialsharing.share('My bitcoin address: ' + addr); window.ignoreMobilePause = true;
window.plugins.socialsharing.share('My bitcoin address: ' + addr, null, null, null);
} }
}; };

View File

@ -16,6 +16,12 @@ angular.element(document).ready(function() {
window.location = '#!/signout'; window.location = '#!/signout';
} }
}, false); }, false);
document.addEventListener('resume', function() {
setTimeout(function() {
window.ignoreMobilePause = false;
}, 100);
}, false);
document.addEventListener('backbutton', function() { document.addEventListener('backbutton', function() {
window.location = '#!/homeWallet'; window.location = '#!/homeWallet';