Addons can use OngoingProcess indicator

Make Copay to call ``setOngoingProcess`` when ``Addon/OngoingProcess`` event received.
Addons may emit this event to display relevant process indication to user.
Example: https://github.com/troggy/copay-colored-coins-plugin/blob/feature/transfer-asset/js/controllers/assets.js#L11
This commit is contained in:
Kosta Korenkov 2015-07-16 19:08:27 +03:00
parent d446c9facf
commit 598af4f166
1 changed files with 5 additions and 0 deletions

View File

@ -69,6 +69,10 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
};
});
var disableOngoingProcessListener = $rootScope.$on('Addon/OngoingProcess', function(e, name) {
self.setOngoingProcess(name);
});
$scope.$on('$destroy', function() {
disableAddrListener();
disableScannerListener();
@ -76,6 +80,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
disableTabListener();
disableFocusListener();
disableResumeListener();
disableOngoingProcessListener();
$rootScope.hideMenuBar = false;
});