Fix: Update pinned tab entries to include triggering principal

This commit updates the pinned tab entries to include the triggering principal.

Previously, the pinned tab entries only included the URL and title of the tab. This caused issues when restoring pinned tabs, as the triggering principal was not being saved.

This commit adds the triggering principal to the pinned tab entries, ensuring that they can be restored correctly.

This fixes the issue where pinned tabs were not being restored correctly.
This commit is contained in:
Kristijan Ribarić 2024-10-12 21:52:07 +02:00
parent 7d8dde9269
commit 5e4ea9889c

View file

@ -95,10 +95,13 @@
_setPinnedAttributes(tab) {
const browser = tab.linkedBrowser;
const tabState = JSON.parse(SessionStore.getTabState(tab));
const activeEntry = tabState.entries[tabState.index - 1];
const entry = {
url: browser.currentURI.spec,
title: tab.label || browser.contentTitle,
triggeringPrincipal_base64: lazy.E10SUtils.SERIALIZED_SYSTEMPRINCIPAL
};
tab.setAttribute("zen-pinned-entry", JSON.stringify(activeEntry));
tab.setAttribute("zen-pinned-entry", JSON.stringify(entry));
tab.setAttribute("zen-pinned-icon", browser.mIconURL);
}