mirror of
https://github.com/HeyPuter/puter.git
synced 2026-10-07 12:21:56 +00:00
feat: re-send unreads on login
This commit is contained in:
1 parent
a1e6887bf9
commit
02fc4d86b7
3 files changed
+61
No files matched your search
@@ -117,6 +117,19 @@ async function UIDesktop(options){
|
||||
});
|
||||
});
|
||||
|
||||
window.__already_got_unreads = false;
|
||||
window.socket.on('notif.unreads', ({ unreads }) => {
|
||||
if ( window.__already_got_unreads ) return;
|
||||
window.__already_got_unreads = true;
|
||||
|
||||
for ( const notif_info of unreads ) {
|
||||
const notification = notif_info.notification;
|
||||
UINotification({
|
||||
content: notification.summary
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
window.socket.on('app.opened', async (app) => {
|
||||
// don't update if this is the original client that initiated the action
|
||||
if(app.original_client_socket_id === window.socket.id)
|
||||
|
||||
Reference in new issue
Block a user