1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-26 10:05:10 +00:00
This commit is contained in:
zumbiepig
2024-08-19 17:14:36 -07:00
parent adcb2d5bdd
commit 7853c5060e
8 changed files with 84 additions and 36 deletions

View File

@@ -11,13 +11,15 @@ self.addEventListener('install', (event) => {
for (const asset of cacheAssets) {
await cache.add(asset);
const progress = `${++cachedAssets}/${totalAssets}`;
cachedAssets++;
const progress = `${cachedAssets}/${totalAssets}`;
const clients = await self.clients.matchAll();
clients.forEach((client) => {
client.postMessage({
title: 'sw-install-progress',
message: progress,
self.clients.matchAll().then((clients) => {
clients.forEach((client) => {
client.postMessage({
title: 'sw-install-progress',
message: progress,
});
});
});
}