Skip to content

Commit f172935

Browse files
authored
few improvements (#1122)
1 parent 10b4fa0 commit f172935

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

src/lib/main.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,23 @@ async function onDeviceReady() {
239239
applySettings.afterRender();
240240
}, 500);
241241
}
242+
setTimeout(() => {
243+
checkPluginsUpdate()
244+
.then((updates) => {
245+
if (!updates.length) return;
246+
acode.pushNotification(
247+
"Plugin Updates",
248+
`${updates.length} plugin${updates.length > 1 ? "s" : ""} ${updates.length > 1 ? "have" : "has"} new version${updates.length > 1 ? "s" : ""} available.`,
249+
{
250+
icon: "extension",
251+
action: () => {
252+
plugins(updates);
253+
},
254+
},
255+
);
256+
})
257+
.catch(console.error);
258+
}, 5000);
242259
}
243260

244261
async function loadApp() {
@@ -408,22 +425,6 @@ async function loadApp() {
408425

409426
initFileList();
410427

411-
checkPluginsUpdate()
412-
.then((updates) => {
413-
if (!updates.length) return;
414-
acode.pushNotification(
415-
"Plugin Updates",
416-
`${updates.length} plugin${updates.length > 1 ? "s" : ""} ${updates.length > 1 ? "have" : "has"} new version${updates.length > 1 ? "s" : ""} available.`,
417-
{
418-
icon: "extension",
419-
action: () => {
420-
plugins(updates);
421-
},
422-
},
423-
);
424-
})
425-
.catch(console.error);
426-
427428
// Check for app updates
428429
if (navigator.onLine) {
429430
fetch("https://api.github.com/repos/Acode-Foundation/Acode/releases/latest")

0 commit comments

Comments
 (0)