mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #5408 from cmgustavo/bug/qr-scanner-01
Fix QR scanner from directive
This commit is contained in:
commit
e244290285
|
@ -364,7 +364,7 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
}, 10);
|
}, 10);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$scope.$on("$ionicView.afterEnter", function(event, data) {
|
||||||
$scope.init();
|
$scope.init();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,17 @@ angular.module('copayApp.directives')
|
||||||
$state.go('scanner', { passthroughMode: 1 });
|
$state.go('scanner', { passthroughMode: 1 });
|
||||||
};
|
};
|
||||||
|
|
||||||
$rootScope.$on('$ionicView.afterEnter', function() {
|
var afterEnter = $rootScope.$on('$ionicView.afterEnter', function() {
|
||||||
if($rootScope.scanResult) {
|
if($rootScope.scanResult) {
|
||||||
scope.onScan({ data: $rootScope.scanResult });
|
scope.onScan({ data: $rootScope.scanResult });
|
||||||
$rootScope.scanResult = null;
|
$rootScope.scanResult = null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Destroy event
|
||||||
|
scope.$on('$destroy', function(){
|
||||||
|
afterEnter();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -336,7 +336,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
url: '/import',
|
url: '/import',
|
||||||
views: {
|
views: {
|
||||||
'tab-home@tabs': {
|
'tab-home@tabs': {
|
||||||
templateUrl: 'views/import.html'
|
templateUrl: 'views/import.html',
|
||||||
|
controller: 'importController'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -787,7 +788,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
url: '/import',
|
url: '/import',
|
||||||
views: {
|
views: {
|
||||||
'onboarding': {
|
'onboarding': {
|
||||||
templateUrl: 'views/import.html'
|
templateUrl: 'views/import.html',
|
||||||
|
controller: 'importController'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<ion-view id="import" ng-controller="tabsController" ng-init="importInit()" class="settings">
|
<ion-view id="import" class="settings">
|
||||||
<ion-nav-bar class="bar-royal">
|
<ion-nav-bar class="bar-royal">
|
||||||
<ion-nav-title>{{'Import Wallet' | translate}}</ion-nav-title>
|
<ion-nav-title>{{'Import Wallet' | translate}}</ion-nav-title>
|
||||||
<ion-nav-back-button>
|
<ion-nav-back-button>
|
||||||
</ion-nav-back-button>
|
</ion-nav-back-button>
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
|
|
||||||
<ion-content ng-controller="importController" ng-init="phrase = true; init()">
|
<ion-content ng-init="phrase = true">
|
||||||
<div class="row text-center top-tabs">
|
<div class="row text-center top-tabs">
|
||||||
<div class="col" ng-click="phrase = true; file = hardware = false; showAdv = false" ng-style="phrase &&
|
<div class="col" ng-click="phrase = true; file = hardware = false; showAdv = false" ng-style="phrase &&
|
||||||
{'border-bottom-style': 'solid'}">
|
{'border-bottom-style': 'solid'}">
|
||||||
|
|
Loading…
Reference in New Issue