[Pale-Moon] Issue #1722 - Part 2: Allow hiding pinned tabs for the All Tabs graphical pane

pull/24/head
FranklinDM 3 years ago committed by Roy Tam
parent 1743bff855
commit 9b300b010d
  1. 1
      application/palemoon/app/profile/palemoon.js
  2. 11
      application/palemoon/base/content/browser-tabPreviews.js

@ -468,6 +468,7 @@ pref("browser.tabs.showAudioPlayingIcon", true);
pref("browser.tabs.delayHidingAudioPlayingIconMS", 3000);
pref("browser.allTabs.previews", true);
pref("browser.allTabs.hidePinnedTabs", false);
pref("browser.ctrlTab.previews", true);
pref("browser.ctrlTab.hidePinnedTabs", false);
pref("browser.ctrlTab.recentlyUsedLimit", 7);

@ -667,6 +667,15 @@ var allTabs = {
this._currentFilter = this.filterField.value;
let hidePinnedTabs = gPrefService.getBoolPref("browser.allTabs.hidePinnedTabs");
if (hidePinnedTabs) {
let regularTabsList = Array.filter(this.previews, function (preview) !preview._tab.pinned);
// Show pinned tabs if we don't have any regular tabs
if (regularTabsList.length == 0) {
hidePinnedTabs = false;
}
}
var filter = this._currentFilter.split(/\s+/g);
this._visible = 0;
Array.forEach(this.previews, function (preview) {
@ -681,7 +690,7 @@ var allTabs = {
for (let i = 0; i < filter.length; i++)
matches += tabstring.includes(filter[i]);
}
if (matches < filter.length || tab.hidden) {
if (matches < filter.length || tab.hidden || (hidePinnedTabs && tab.pinned)) {
preview.hidden = true;
}
else {

Loading…
Cancel
Save