mirror of
https://github.com/frappe/books.git
synced 2024-12-23 03:19:01 +00:00
chore: fix telemetry calls (rebase master)
This commit is contained in:
parent
47e6493699
commit
54b1a60883
@ -53,9 +53,14 @@ export default function registerIpcRendererListeners() {
|
||||
error.name = 'Updation Error';
|
||||
handleError(true, error);
|
||||
});
|
||||
|
||||
|
||||
document.addEventListener('visibilitychange', function () {
|
||||
if (document.visibilityState !== 'hidden') {
|
||||
const { visibilityState } = document;
|
||||
if (visibilityState === 'visible' && !telemetry.started) {
|
||||
telemetry.start();
|
||||
}
|
||||
|
||||
if (visibilityState !== 'hidden') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user