Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #25239 from davidflanagan/bug1062114
Browse files Browse the repository at this point in the history
Bug 1062114: double-check that we're still hidden before exiting r=pdahiya
  • Loading branch information
David Flanagan committed Oct 21, 2014
2 parents 4d7f051 + 995591d commit 3d7d592
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/gallery/js/gallery.js
Expand Up @@ -1429,7 +1429,14 @@ function doNotScanInBackgroundHack(photodb) {
// wait a bit for the log to be flushed, and then close the application
if (document.hidden && photodb.scanning) {
console.warn('[Gallery] exiting to avoid background scan.');
setTimeout(function() { window.close(); }, 500);
setTimeout(function() {
if (document.hidden) {
window.close();
}
else {
console.warn('[Gallery] now visible again, so not exiting');
}
}, 500);
}
}
}
Expand Down

0 comments on commit 3d7d592

Please sign in to comment.