mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-20 01:12:38 +01:00
Use the warning toolbar icon only if unprocessed requests
Related discussion:
- https://github.com/uBlockOrigin/uAssets/discussions/16939
Related commit:
- 0c9576d3e6
This commit is contained in:
parent
8e35aa74f0
commit
39cac612c2
@ -1231,10 +1231,16 @@ vAPI.Net = class {
|
||||
if ( this.suspendableListener !== undefined ) {
|
||||
return this.suspendableListener(details);
|
||||
}
|
||||
if ( this.unprocessedRequestCount === 0 ) {
|
||||
vAPI.setDefaultIcon('-loading');
|
||||
}
|
||||
this.unprocessedRequestCount += 1;
|
||||
}
|
||||
setSuspendableListener(listener) {
|
||||
this.suspendableListener = listener;
|
||||
if ( this.unprocessedRequestCount !== 0 ) {
|
||||
vAPI.setDefaultIcon('');
|
||||
}
|
||||
}
|
||||
removeListener(which, clientListener) {
|
||||
const actualListener = this.listenerMap.get(clientListener);
|
||||
|
@ -29,8 +29,6 @@ import './vapi-common.js';
|
||||
import './vapi-background.js';
|
||||
import './vapi-background-ext.js';
|
||||
|
||||
vAPI.setDefaultIcon('-loading'); // Do this as soon as possible
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
// The following modules are loaded here until their content is better organized
|
||||
@ -462,8 +460,6 @@ if ( selfieIsValid !== true ) {
|
||||
// This can be used to defer filtering decision-making.
|
||||
µb.readyToFilter = true;
|
||||
|
||||
vAPI.setDefaultIcon('');
|
||||
|
||||
// Start network observers.
|
||||
webRequest.start();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user