]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/static/js/view_mail.js
MAKE WAY FOR BIFF in webcit-ng
[citadel.git] / webcit-ng / static / js / view_mail.js
index 503eedfc6fc76ba4ef4686ec2efe541783117b87..eeda88fc35ef7cdad20e0d7e87897b11f45b6859 100644 (file)
@@ -231,11 +231,9 @@ function refresh_mail_display() {
 
 
 // This is where the rendering of the message list in the mailbox view is performed.
-// Set notify to newmail_notify.NO or newmail_notify.YES depending on whether we want notifications for new mail.
+// Set notify to newmail_notify.NO or newmail_notify.YES depending on whether we are interested in the arrival of new messages.
 function render_mailbox_display(notify) {
 
-       let do_notify = 0;
-
        url = "/ctdl/r/" + escapeHTMLURI(current_room) + "/mailbox";
        fetch_mailbox = async() => {
                response = await fetch(url);
@@ -254,7 +252,6 @@ function render_mailbox_display(notify) {
                                let m = parseInt(msgs[i].msgnum);
                                if (m > highest_mailnum) {
                                        highest_mailnum = m;
-                                       do_notify += 1;
                                }
                        }
 
@@ -264,10 +261,20 @@ function render_mailbox_display(notify) {
                        if (selected_message > 0) {                     // if we had a message selected, keep it selected
                                select_message(selected_message);
                        }
+
+
+
+
+/*
                        if ( (do_notify > 0) && (notify == newmail_notify.YES) ) {
                                console.log(do_notify + " new mail");
                                new_mail_sound.play();                  // FIXME do a visual notification as well
+                                                                       // FIXME move this to BIFF
                        }
+ */
+
+
+
                }
        }
        fetch_mailbox();