From b39961e43e35d3aa8da0c7e7c5964b78dee8c810 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Tue, 25 Feb 2025 09:07:22 +0100 Subject: [PATCH] Fixed reordering tabs when having essentials --- .github/workflows/linux-release-build.yml | 6 +----- .github/workflows/macos-release-build.yml | 6 +----- .github/workflows/windows-release-build.yml | 5 +---- .../components/tabbrowser/content/tabbrowser-js.patch | 4 ++-- 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 8afeb6121..1151a6725 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -50,7 +50,7 @@ jobs: node-version-file: '.nvmrc' - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.7 + uses: mozilla-actions/sccache-action@main - name: Setup Git run: | @@ -147,7 +147,3 @@ jobs: retention-days: 5 name: linux_update_manifest_${{ matrix.arch }} path: ./dist/update - - - name: Run sccache stat for check - shell: bash - run: ${SCCACHE_PATH} --show-stats diff --git a/.github/workflows/macos-release-build.yml b/.github/workflows/macos-release-build.yml index 9bde71a4c..c8540c188 100644 --- a/.github/workflows/macos-release-build.yml +++ b/.github/workflows/macos-release-build.yml @@ -42,7 +42,7 @@ jobs: node-version-file: '.nvmrc' - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.7 + uses: mozilla-actions/sccache-action@main - name: Setup Python uses: actions/setup-python@v5 @@ -163,7 +163,3 @@ jobs: retention-days: 1 name: platform.ini path: ./platform.ini - - - name: Run sccache stat for check - shell: bash - run: ${SCCACHE_PATH} --show-stats diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index f92ca05c1..2c8d43e4a 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -56,7 +56,7 @@ jobs: node-version-file: '.nvmrc' - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.7 + uses: mozilla-actions/sccache-action@main - name: Setup Git run: | @@ -313,6 +313,3 @@ jobs: name: windows_update_manifest_${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }} path: ./dist/update - - name: Run sccache stat for check - shell: bash - run: ${SCCACHE_PATH} --show-stats diff --git a/src/browser/components/tabbrowser/content/tabbrowser-js.patch b/src/browser/components/tabbrowser/content/tabbrowser-js.patch index 0bb719890..4e0f162aa 100644 --- a/src/browser/components/tabbrowser/content/tabbrowser-js.patch +++ b/src/browser/components/tabbrowser/content/tabbrowser-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js -index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..dd8fba935e26aa0f00b687f23b64935dfcf339fa 100644 +index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..8dc6feb3d5d584214af4c351ae4c40b62353f766 100644 --- a/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js @@ -406,11 +406,50 @@ @@ -416,7 +416,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..dd8fba935e26aa0f00b687f23b64935d + aIndex = aTab.hasAttribute('zen-essential') ? Math.min(aIndex, this._numZenEssentials) : Math.min(aIndex, this._numVisiblePinTabs - 1); } else { - aIndex = Math.max(aIndex, this.pinnedTabCount); -+ aIndex = Math.max(aIndex, this._numVisiblePinTabsWithoutGlance + this._numZenEssentials); ++ aIndex = Math.max(aIndex, this._numVisiblePinTabsWithoutGlance); } if (aTab._tPos == aIndex) { return;