fix(scanner): fix a bug which can cause the scanner to remain active indefinitely

fixes #4967
This commit is contained in:
Jason Dreyzehner 2017-01-20 09:09:36 -05:00
commit b31719dbeb
2 changed files with 3 additions and 2 deletions

View file

@ -81,6 +81,8 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
handleSuccessfulScan(contents); handleSuccessfulScan(contents);
} }
}); });
// resume preview if paused
scannerService.resumePreview();
}); });
}); });
} }
@ -103,7 +105,6 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
} }
$rootScope.$on('incomingDataMenu.menuHidden', function() { $rootScope.$on('incomingDataMenu.menuHidden', function() {
scannerService.resumePreview();
activate(); activate();
}); });

View file

@ -129,7 +129,7 @@ angular.module('copayApp.services').service('scannerService', function($log, $ti
var nextHide = null; var nextHide = null;
var nextDestroy = null; var nextDestroy = null;
var hideAfterSeconds = 7; var hideAfterSeconds = 5;
var destroyAfterSeconds = 60; var destroyAfterSeconds = 60;
/** /**