mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 09:31:01 +01:00
Split fetching settings/storage used in Settings pane
Computing storage-used figures can take longer than usual sometimes when a lot of filter lists are enabled, and this can cause the Settings pane to take longer to be filled the first time it is opened. Fetching settings and storage-used figures separately removes that potential delay (they were fetched together in a single Promise.all() call).
This commit is contained in:
parent
ec2670903b
commit
b34e6da6ec
1 changed files with 6 additions and 6 deletions
|
@ -271,12 +271,12 @@ const onUserSettingsReceived = function(details) {
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
Promise.all([
|
vAPI.messaging.send('dashboard', { what: 'userSettings' }).then(result => {
|
||||||
vAPI.messaging.send('dashboard', { what: 'userSettings' }),
|
onUserSettingsReceived(result);
|
||||||
vAPI.messaging.send('dashboard', { what: 'getLocalData' }),
|
});
|
||||||
]).then(results => {
|
|
||||||
onUserSettingsReceived(results[0]);
|
vAPI.messaging.send('dashboard', { what: 'getLocalData' }).then(result => {
|
||||||
onLocalDataReceived(results[1]);
|
onLocalDataReceived(result);
|
||||||
});
|
});
|
||||||
|
|
||||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/591
|
// https://github.com/uBlockOrigin/uBlock-issues/issues/591
|
||||||
|
|
Loading…
Reference in a new issue