Window gained focus event
This commit is contained in:
@@ -83,6 +83,8 @@ class DesktopManager {
|
||||
if(!this.passcodeManager.isLocked()) {
|
||||
this.syncManager.sync();
|
||||
}
|
||||
|
||||
this.$rootScope.$broadcast("window-gained-focus");
|
||||
}
|
||||
|
||||
desktop_windowLostFocus() {
|
||||
|
||||
@@ -148,8 +148,10 @@ class PasscodeManager {
|
||||
if(isDesktopApplication()) {
|
||||
// desktop only
|
||||
this.$rootScope.$on("window-lost-focus", () => {
|
||||
let visible = false;
|
||||
this.documentVisibilityChanged(visible);
|
||||
this.documentVisibilityChanged(false);
|
||||
})
|
||||
this.$rootScope.$on("window-gained-focus", () => {
|
||||
this.documentVisibilityChanged(true);
|
||||
})
|
||||
} else {
|
||||
// tab visibility listender, web only
|
||||
|
||||
Reference in New Issue
Block a user