Refactor ZenTabUnloader to simplify tab unloading condition

This commit is contained in:
mauro-balades 2024-09-26 18:58:59 +02:00
parent cb24052969
commit 1fa61f4349

View file

@ -233,10 +233,7 @@
}
const diff = currentTimestamp - lastActivity;
// Check if the tab has been inactive for more than the timeout
if (diff < lazy.zenTabUnloaderTimeout * 60 * 1000) {
return false;
}
return true;
return diff > lazy.zenTabUnloaderTimeout * 60 * 1000;
}
}