mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-27 16:25:15 +02:00
Try to go to Home Screen in case of screen failure.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
var FastImageRender = require('./fast-image-render').FastImageRender
|
||||
|
||||
module.exports = function DeviceScreenDirective($document, ScalingService, VendorUtil, PageVisibilityService, BrowserInfo) {
|
||||
module.exports = function DeviceScreenDirective($document, ScalingService, VendorUtil, PageVisibilityService, BrowserInfo, $timeout) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
template: require('./screen.jade'),
|
||||
@@ -116,7 +116,8 @@ module.exports = function DeviceScreenDirective($document, ScalingService, Vendo
|
||||
}
|
||||
|
||||
scope.retryLoadingScreen = function () {
|
||||
maybeLoadScreen()
|
||||
scope.control.home()
|
||||
$timeout(maybeLoadScreen, 1000)
|
||||
}
|
||||
|
||||
function maybeLoadScreen() {
|
||||
|
||||
Reference in New Issue
Block a user