Merge pull request #2915 from cmgustavo/bug/reconnect-02

Disabling unnecessary online/offline events for mobile/desktop
This commit is contained in:
Matias Alejo Garcia 2015-06-28 09:11:32 -03:00
commit 801ad1b798
6 changed files with 5 additions and 42 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.services')
.factory('profileService', function profileServiceFactory($rootScope, $location, $timeout, $filter, $log, lodash, storageService, bwcService, configService, notificationService, isChromeApp, isCordova, gettext) {
.factory('profileService', function profileServiceFactory($rootScope, $location, $timeout, $filter, $log, lodash, storageService, bwcService, configService, notificationService, isChromeApp, isCordova, gettext, nodeWebkit) {
var root = {};
@ -64,14 +64,14 @@ angular.module('copayApp.services')
client.on('reconnect', function() {
if (root.focusedClient.credentials.walletId == client.credentials.walletId) {
$rootScope.$emit('Local/Online');
$log.debug('### Online');
}
});
client.on('reconnecting', function() {
if (root.focusedClient.credentials.walletId == client.credentials.walletId) {
$rootScope.$emit('Local/Offline');
$log.debug('### Offline');
}
});