From 51e14a1fd9c8d622322e2ddaafa464039dced605 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 02 Oct 2007 02:59:08 -0400
Subject: [PATCH] Fix loading of next messages after moving/deleting (#1484307)

---
 skins/default/mail.css          |    3 ++-
 program/steps/mail/move_del.inc |    6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index acdbf60..b24fa22 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -19,6 +19,10 @@
 
 */
 
+// count pages before changing anything
+$old_count = $IMAP->messagecount();
+$old_pages = ceil($old_count / $IMAP->page_size);
+
 // move messages
 if ($_action=='moveto' && !empty($_POST['_uid']) && !empty($_POST['_target_mbox']))
 {
@@ -78,7 +82,7 @@
 $OUTPUT->command('set_quota', $IMAP->get_quota());
 
 // add new rows from next page (if any)
-if ($_POST['_from']!='show' && $pages>1 && $IMAP->list_page < $pages)
+if ($_POST['_from']!='show' && $old_pages>1 && $IMAP->list_page < $old_pages)
 {
   $sort_col   = isset($_SESSION['sort_col'])   ? $_SESSION['sort_col']   : $CONFIG['message_sort_col'];
   $sort_order = isset($_SESSION['sort_order']) ? $_SESSION['sort_order'] : $CONFIG['message_sort_order'];
diff --git a/skins/default/mail.css b/skins/default/mail.css
index 45dc950..fb130ce 100644
--- a/skins/default/mail.css
+++ b/skins/default/mail.css
@@ -282,7 +282,8 @@
   font-weight: bold;
 }
 
-#mailboxlist li.selected
+#mailboxlist li.selected,
+#mailboxlist li.droptarget li.selected
 {
   background-color: #929292;
 }

--
Gitblit v1.9.1