From bc4960108e78b8a571745f55f54c83ea34fd0336 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 09 Apr 2010 11:12:40 -0400
Subject: [PATCH] Option not to mark messages as read when viewed in preview pane (#1485012)

---
 program/steps/mail/compose.inc |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 658f590..2fac294 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -143,6 +143,10 @@
   $CONFIG['prefer_html'] = $CONFIG['prefer_html'] || $CONFIG['htmleditor'] || $compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT;
   $MESSAGE = new rcube_message($msg_uid);
   
+  // make sure message is marked as read
+  if ($MESSAGE && $MESSAGE->headers && !$MESSAGE->headers->seen)
+    $IMAP->set_flag($msg_uid, 'SEEN');
+
   if (!empty($MESSAGE->headers->charset))
     $IMAP->set_charset($MESSAGE->headers->charset);
     

--
Gitblit v1.9.1