From ac0fc383fd43e8955b0ab22f70463159b14c74b0 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 23 Dec 2013 05:33:41 -0500
Subject: [PATCH] Fix so message flags modified by another client are applied on the list on refresh (#1485186)

---
 program/steps/mail/list.inc |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc
index fe7991c..91c53e8 100644
--- a/program/steps/mail/list.inc
+++ b/program/steps/mail/list.inc
@@ -23,8 +23,8 @@
   return;
 }
 
-$save_arr       = array();
-$dont_override  = (array) $RCMAIL->config->get('dont_override');
+$save_arr      = array();
+$dont_override = (array) $RCMAIL->config->get('dont_override');
 
 // is there a sort type for this request?
 if ($sort = rcube_utils::get_input_value('_sort', rcube_utils::INPUT_GET)) {
@@ -104,6 +104,13 @@
   if ($search_request) {
     $OUTPUT->show_message('searchsuccessful', 'confirmation', array('nr' => $count));
   }
+
+  // remember last HIGHESTMODSEQ value (if supported)
+  // we need it for flag updates in check-recent
+  $data = $RCMAIL->storage->folder_data($mbox_name);
+  if (!empty($data['HIGHESTMODSEQ'])) {
+    $_SESSION['list_mod_seq'] = $data['HIGHESTMODSEQ'];
+  }
 }
 else {
   // handle IMAP errors (e.g. #1486905)

--
Gitblit v1.9.1