mirror of https://github.com/gorhill/uBlock.git
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 ) {
|
if ( this.suspendableListener !== undefined ) {
|
||||||
return this.suspendableListener(details);
|
return this.suspendableListener(details);
|
||||||
}
|
}
|
||||||
|
if ( this.unprocessedRequestCount === 0 ) {
|
||||||
|
vAPI.setDefaultIcon('-loading');
|
||||||
|
}
|
||||||
this.unprocessedRequestCount += 1;
|
this.unprocessedRequestCount += 1;
|
||||||
}
|
}
|
||||||
setSuspendableListener(listener) {
|
setSuspendableListener(listener) {
|
||||||
this.suspendableListener = listener;
|
this.suspendableListener = listener;
|
||||||
|
if ( this.unprocessedRequestCount !== 0 ) {
|
||||||
|
vAPI.setDefaultIcon('');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
removeListener(which, clientListener) {
|
removeListener(which, clientListener) {
|
||||||
const actualListener = this.listenerMap.get(clientListener);
|
const actualListener = this.listenerMap.get(clientListener);
|
||||||
|
|
|
@ -29,8 +29,6 @@ import './vapi-common.js';
|
||||||
import './vapi-background.js';
|
import './vapi-background.js';
|
||||||
import './vapi-background-ext.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
|
// 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.
|
// This can be used to defer filtering decision-making.
|
||||||
µb.readyToFilter = true;
|
µb.readyToFilter = true;
|
||||||
|
|
||||||
vAPI.setDefaultIcon('');
|
|
||||||
|
|
||||||
// Start network observers.
|
// Start network observers.
|
||||||
webRequest.start();
|
webRequest.start();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue