mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-24 00:36:17 -04:00
Try to speed up LCP allSettled
This commit is contained in:
parent
924c17323d
commit
fcb854a000
2 changed files with 5 additions and 5 deletions
|
@ -40,21 +40,21 @@ class PairDrop {
|
|||
this.footerUI = new FooterUI();
|
||||
|
||||
// Translate page, initiate database, and evaluate what to show
|
||||
await Promise.all([
|
||||
await Promise.allSettled([
|
||||
PersistentStorage.initiate(),
|
||||
Localization.initiate(),
|
||||
this.evaluatePermissionsAndRoomSecrets()
|
||||
]);
|
||||
|
||||
// Evaluate css shifting UI elements and show loading placeholder
|
||||
await Promise.all([
|
||||
await Promise.allSettled([
|
||||
this.headerUI.evaluateOverflowing(),
|
||||
this.footerUI._evaluateFooterBadges(),
|
||||
this.footerUI.showLoading()
|
||||
]);
|
||||
|
||||
// Fade in UI elements
|
||||
await Promise.all([
|
||||
await Promise.allSettled([
|
||||
this.headerUI.fadeIn(),
|
||||
this.footerUI.fadeIn(),
|
||||
this.centerUI.fadeIn(),
|
||||
|
@ -111,7 +111,7 @@ class PairDrop {
|
|||
async loadDeferredAssets() {
|
||||
const stylePromises = this.stylesDeferred.map(url => this.loadAndApplyStylesheet(url));
|
||||
const scriptPromises = this.scriptsDeferred.map(url => this.loadAndApplyScript(url));
|
||||
await Promise.all([...stylePromises, ...scriptPromises]);
|
||||
await Promise.allSettled([...stylePromises, ...scriptPromises]);
|
||||
}
|
||||
|
||||
loadStyleSheet(url) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue