]> code.citadel.org Git - citadel.git/commitdiff
* When viewing a mailbox (view == VIEW_MAILBOX), messages are marked as
authorArt Cancro <ajc@citadel.org>
Sun, 12 Jun 2005 16:03:11 +0000 (16:03 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 12 Jun 2005 16:03:11 +0000 (16:03 +0000)
  seen when they are viewed, and Goto does not automatically mark the
  remaining messages as seen.

webcit/ChangeLog
webcit/messages.c
webcit/webcit.c

index 1b7f8df485f34fda0c3c24025342226f51a2b30d..6caf12d23b7e7114ad42f28fcc62608cf3ac89eb 100644 (file)
@@ -1,4 +1,9 @@
 $Log$
+Revision 611.7  2005/06/12 16:03:11  ajc
+* When viewing a mailbox (view == VIEW_MAILBOX), messages are marked as
+  seen when they are viewed, and Goto does not automatically mark the
+  remaining messages as seen.
+
 Revision 611.6  2005/06/11 22:29:07  ajc
 * Integrated the first batch of new icons.
 
@@ -2560,4 +2565,3 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
index f6d6a3dcc9a6f576e85c59f684fbe897b6755579..d3525ae7f1a59ac08432f5db7046fd3d2b7abcdd 100644 (file)
@@ -1412,6 +1412,15 @@ DONE:
 
        wDumpContent(1);
        if (addrbook != NULL) free(addrbook);
+
+       /* If we got here via a mailbox view and are reading a single
+        * message, mark it as "seen." We do this after rendering the web page
+        * so it doesn't keep the user waiting.
+        */
+       if ( (maxmsgs == 1) && (WC->wc_view == VIEW_MAILBOX) ) {
+               serv_printf("SEEN %ld|1", startmsg);
+               serv_getln(buf, sizeof buf);
+       }
 }
 
 
index b27dcc5ecab38052fd3d5ec48b786f94a6bd9890..426ad76812322b190e0e99aec91105f0ea7d7d79 100644 (file)
@@ -1165,7 +1165,9 @@ void session_loop(struct httprequest *req)
        } else if (!strcasecmp(action, "ungoto")) {
                ungoto();
        } else if (!strcasecmp(action, "dotgoto")) {
-               slrp_highest();
+               if (WC->wc_view != VIEW_MAILBOX) {      /* dotgoto acts like dotskip when we're in a mailbox view */
+                       slrp_highest();
+               }
                smart_goto(bstr("room"));
        } else if (!strcasecmp(action, "dotskip")) {
                smart_goto(bstr("room"));