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