fix touchdown default in android. reconnecting debouce

This commit is contained in:
Matias Alejo Garcia 2015-05-04 13:27:12 -03:00
commit 476d5ecba7
3 changed files with 10 additions and 10 deletions

View file

@ -588,7 +588,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r
$rootScope.$on('Local/Offline', function(event) {
$log.debug('### Offline event');
if (!self.offLineSince) self.offLineSince = Date.now();
if (Date.now() - sef.offLineSince > 1000) {
if (Date.now() - self.offLineSince > 10000) {
self.isOffline = true;
$timeout(function() {
$rootScope.$apply();

View file

@ -48,16 +48,12 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
var disableOnlineListener = $rootScope.$on('Local/Online', function() {
// This is needed then the apps go to sleep
$timeout(function() {
self.bindTouchDown();
}, 2000);
self.bindTouchDown();
});
var disableResumeListener = $rootScope.$on('Local/Resume', function() {
// This is needed then the apps go to sleep
$timeout(function() {
self.bindTouchDown();
}, 2000);
self.bindTouchDown();
});
@ -391,8 +387,11 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
['hamburger', 'menu-walletHome', 'menu-send', 'menu-receive', 'menu-history'].forEach(function(id) {
var e = document.getElementById(id);
if (e) e.addEventListener('touchstart', function() {
try {
event.preventDefault();
} catch (e) {};
angular.element(e).triggerHandler('click');
});
}, true);
});
}