import profile/wallet on android
This commit is contained in:
parent
88d125e1be
commit
5a252f8ae8
5 changed files with 21 additions and 7 deletions
|
|
@ -9,6 +9,13 @@ angular.module('copayApp.controllers').controller('ImportController',
|
||||||
$scope.is_iOS = isMobile.iOS();
|
$scope.is_iOS = isMobile.iOS();
|
||||||
$scope.importOpts = {};
|
$scope.importOpts = {};
|
||||||
|
|
||||||
|
window.ignoreMobilePause = true;
|
||||||
|
$scope.$on('$destroy', function() {
|
||||||
|
$timeout(function(){
|
||||||
|
window.ignoreMobilePause = false;
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
|
||||||
Compatibility.check($scope);
|
Compatibility.check($scope);
|
||||||
|
|
||||||
var reader = new FileReader();
|
var reader = new FileReader();
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,13 @@ angular.module('copayApp.controllers').controller('ImportProfileController',
|
||||||
$scope.hideAdv = true;
|
$scope.hideAdv = true;
|
||||||
$scope.is_iOS = isMobile.iOS();
|
$scope.is_iOS = isMobile.iOS();
|
||||||
|
|
||||||
|
window.ignoreMobilePause = true;
|
||||||
|
$scope.$on('$destroy', function() {
|
||||||
|
$timeout(function(){
|
||||||
|
window.ignoreMobilePause = false;
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
|
||||||
var reader = new FileReader();
|
var reader = new FileReader();
|
||||||
|
|
||||||
var updateStatus = function(status) {
|
var updateStatus = function(status) {
|
||||||
|
|
|
||||||
|
|
@ -99,11 +99,11 @@ angular.module('copayApp.controllers').controller('JoinController',
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.scannerIntent = function() {
|
$scope.scannerIntent = function() {
|
||||||
window.usingCamera = true;
|
window.ignoreMobilePause = true;
|
||||||
cordova.plugins.barcodeScanner.scan(
|
cordova.plugins.barcodeScanner.scan(
|
||||||
function onSuccess(result) {
|
function onSuccess(result) {
|
||||||
$timeout(function(){
|
$timeout(function(){
|
||||||
window.usingCamera = false;
|
window.ignoreMobilePause = false;
|
||||||
}, 100);
|
}, 100);
|
||||||
if (result.cancelled) return;
|
if (result.cancelled) return;
|
||||||
|
|
||||||
|
|
@ -112,7 +112,7 @@ angular.module('copayApp.controllers').controller('JoinController',
|
||||||
},
|
},
|
||||||
function onError(error) {
|
function onError(error) {
|
||||||
$timeout(function(){
|
$timeout(function(){
|
||||||
window.usingCamera = false;
|
window.ignoreMobilePause = false;
|
||||||
}, 100);
|
}, 100);
|
||||||
alert('Scanning error');
|
alert('Scanning error');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -285,11 +285,11 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.scannerIntent = function() {
|
$scope.scannerIntent = function() {
|
||||||
window.usingCamera = true;
|
window.ignoreMobilePause = true;
|
||||||
cordova.plugins.barcodeScanner.scan(
|
cordova.plugins.barcodeScanner.scan(
|
||||||
function onSuccess(result) {
|
function onSuccess(result) {
|
||||||
$timeout(function(){
|
$timeout(function(){
|
||||||
window.usingCamera = false;
|
window.ignoreMobilePause = false;
|
||||||
}, 100);
|
}, 100);
|
||||||
if (result.cancelled) return;
|
if (result.cancelled) return;
|
||||||
|
|
||||||
|
|
@ -303,7 +303,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
},
|
},
|
||||||
function onError(error) {
|
function onError(error) {
|
||||||
$timeout(function(){
|
$timeout(function(){
|
||||||
window.usingCamera = false;
|
window.ignoreMobilePause = false;
|
||||||
}, 100);
|
}, 100);
|
||||||
alert('Scanning error');
|
alert('Scanning error');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ angular.element(document).ready(function() {
|
||||||
document.addEventListener('deviceready', function() {
|
document.addEventListener('deviceready', function() {
|
||||||
|
|
||||||
document.addEventListener('pause', function() {
|
document.addEventListener('pause', function() {
|
||||||
if (!window.usingCamera) {
|
if (!window.ignoreMobilePause) {
|
||||||
window.location = '#!';
|
window.location = '#!';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue