Refactor ZenTabUnloader to exclude tabs with sound playing or marked for ignore

This commit is contained in:
mauro-balades 2024-09-27 20:09:06 +02:00
parent 65782ccf69
commit 3681f71acf

View file

@ -220,7 +220,8 @@
canUnloadTab(tab, currentTimestamp, excludedUrls) {
if (tab.pinned || tab.selected || tab.multiselected
|| tab.hasAttribute("busy") || tab.hasAttribute("pending")
|| !tab.linkedPanel || tab.splitView || tab.attention
|| !tab.linkedPanel || tab.splitView || tab.attention || tab.soundPlaying
|| tab.zenIgnoreUnload
|| excludedUrls.some(url => url.test(tab.linkedBrowser.currentURI.spec))) {
return false;
}