mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 10:22:30 +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
@ -271,12 +271,12 @@ const onUserSettingsReceived = function(details) {
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
Promise.all([
|
||||
vAPI.messaging.send('dashboard', { what: 'userSettings' }),
|
||||
vAPI.messaging.send('dashboard', { what: 'getLocalData' }),
|
||||
]).then(results => {
|
||||
onUserSettingsReceived(results[0]);
|
||||
onLocalDataReceived(results[1]);
|
||||
vAPI.messaging.send('dashboard', { what: 'userSettings' }).then(result => {
|
||||
onUserSettingsReceived(result);
|
||||
});
|
||||
|
||||
vAPI.messaging.send('dashboard', { what: 'getLocalData' }).then(result => {
|
||||
onLocalDataReceived(result);
|
||||
});
|
||||
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/591
|
||||
|
Loading…
Reference in New Issue
Block a user