1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-14 23:12:28 +02: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:
Raymond Hill 2020-06-06 08:45:24 -04:00
parent ec2670903b
commit b34e6da6ec
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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