mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 14:29:59 +02:00
Refactor ZenTabUnloader to simplify tab unloading condition
This commit is contained in:
parent
cb24052969
commit
1fa61f4349
1 changed files with 1 additions and 4 deletions
|
@ -233,10 +233,7 @@
|
||||||
}
|
}
|
||||||
const diff = currentTimestamp - lastActivity;
|
const diff = currentTimestamp - lastActivity;
|
||||||
// Check if the tab has been inactive for more than the timeout
|
// Check if the tab has been inactive for more than the timeout
|
||||||
if (diff < lazy.zenTabUnloaderTimeout * 60 * 1000) {
|
return diff > lazy.zenTabUnloaderTimeout * 60 * 1000;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue