improved ui and added missing blahs

This commit is contained in:
olcxja 2026-05-29 10:13:58 +02:00
commit 5c91c341a0
12 changed files with 168 additions and 44 deletions

View file

@ -109,8 +109,6 @@
//if fails continue loading encryption may be broken
console.error(e);
}
await delay(600); //because we need to wair for animations
await refreshDms();
} else {
showBlahNotification("error:auth.failed.redirect.to.login");
await delay(2000);
@ -126,14 +124,19 @@
}
}
async function refreshDms() {
async function refreshDms(waittime = 0) {
try {
showAction("action.dm.fetch", "dmrefresh");
await delay(waittime);
if (window.cachedDms && typeof renderDms === 'function') {
await renderDms(window.cachedDms);
}
let res = await fetchEncrypted("user/dm/list");
clearAction("dmrefresh");
window.cachedDms = res;
if (typeof renderDms === 'function') {
await renderDms(res);
}
clearAction("dmrefresh");
}
catch (e) {
clearAction("dmrefresh");