Added the Refresh All button to invalidate caches and force requests to be sent again
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/** Register synchronously; replies retain the WebExtension sendResponse contract. */
|
||||
function registerBackgroundMessages({
|
||||
messageTypes,
|
||||
invalidateProductsCache,
|
||||
getXsrfTokenCookie,
|
||||
refreshXsrfCookie,
|
||||
requestAccountPlans,
|
||||
@@ -20,6 +21,10 @@ runtimeApi.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (message.type === messageTypes.invalidateProductsCache) {
|
||||
invalidateProductsCache().then(() => sendResponse({ ok: true })).catch(error => sendResponse({ ok: false, error: error.message || "Unable to clear products cache." }));
|
||||
return true;
|
||||
}
|
||||
if (message.type === messageTypes.getXsrfToken) {
|
||||
getXsrfTokenCookie()
|
||||
.then((result) => {
|
||||
|
||||
Reference in New Issue
Block a user