add message read/unread render & fix profile display
This commit is contained in:
parent
271c573fb4
commit
68ac0beedf
14 changed files with 290 additions and 38 deletions
|
|
@ -157,9 +157,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
async function refreshDms(waittime = 0) {
|
||||
async function refreshDms(waittime = 0, showLoading = true) {
|
||||
try {
|
||||
showAction("action.dm.fetch", "dmrefresh");
|
||||
if (showLoading) showAction("action.dm.fetch", "dmrefresh");
|
||||
await delay(waittime);
|
||||
if (window.cachedDms && typeof renderDms === 'function') {
|
||||
await renderDms(window.cachedDms);
|
||||
|
|
@ -169,10 +169,10 @@
|
|||
if (typeof renderDms === 'function') {
|
||||
await renderDms(res);
|
||||
}
|
||||
clearAction("dmrefresh");
|
||||
if (showLoading) clearAction("dmrefresh");
|
||||
}
|
||||
catch (e) {
|
||||
clearAction("dmrefresh");
|
||||
if (showLoading) clearAction("dmrefresh");
|
||||
showBlahNotification("error:dm.refresh.failed");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue