ui: fix message.FLAG_ALERT display

This commit is contained in:
undefined committed 2022-12-13 21:36:31 +08:00
1 parent 13c9e86bd9
commit 71f5f5d8fb
3 files changed
+24 -8

No files matched your search

@@ -8,7 +8,6 @@ import { i18n, tpl } from 'vj/utils';
const onmessage = (msg) => {
console.log('Received message', msg);
if (document.hidden) return false;
if (msg.mdoc.flag & FLAG_ALERT) {
// Is alert
new InfoDialog({
@@ -21,6 +20,7 @@ const onmessage = (msg) => {
}).open();
return true;
}
if (document.hidden) return false;
// Is message
new VjNotification({
...(msg.udoc._id === 1 && msg.mdoc.flag & 4)