Link the reload button to clearing the unprocessed-requests status

This commit is contained in:
Raymond Hill 2023-04-11 23:28:27 -04:00
parent be736b20bd
commit 464119af61
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 13 additions and 0 deletions

View File

@ -697,6 +697,7 @@ dom.on('.dismiss', 'click', ( ) => {
what: 'dismissUnprocessedRequest',
tabId: popupData.tabId,
}).then(( ) => {
popupData.hasUnprocessedRequest = false;
dom.cl.remove(dom.root, 'warn');
});
});
@ -1151,6 +1152,18 @@ const setFirewallRuleHandler = function(ev) {
/******************************************************************************/
const reloadTab = function(bypassCache = false) {
// Premptively clear the unprocessed-requests status since we know for sure
// the page is being reloaded in this code path.
if ( popupData.hasUnprocessedRequest === true ) {
messaging.send('popupPanel', {
what: 'dismissUnprocessedRequest',
tabId: popupData.tabId,
}).then(( ) => {
popupData.hasUnprocessedRequest = false;
dom.cl.remove(dom.root, 'warn');
});
}
messaging.send('popupPanel', {
what: 'reloadTab',
tabId: popupData.tabId,