summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/lib/Roundcube/rcube_imap.php4
-rw-r--r--program/steps/mail/search.inc1
-rw-r--r--skins/larry/ui.js7
3 files changed, 9 insertions, 3 deletions
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php
index 794f25a37..6bb922d90 100644
--- a/program/lib/Roundcube/rcube_imap.php
+++ b/program/lib/Roundcube/rcube_imap.php
@@ -332,6 +332,10 @@ class rcube_imap extends rcube_storage
$this->search_sort_field = $set[3];
$this->search_sorted = $set[4];
$this->search_threads = is_a($this->search_set, 'rcube_result_thread');
+
+ if (is_a($this->search_set, 'rcube_result_multifolder')) {
+ $this->set_threading(false);
+ }
}
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index 51dab7dc4..e13bc2ce5 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -181,6 +181,7 @@ else {
// update message count display
$OUTPUT->set_env('search_request', $search_str ? $search_request : '');
+$OUTPUT->set_env('threading', $RCMAIL->storage->get_threading());
$OUTPUT->set_env('messagecount', $count);
$OUTPUT->set_env('pagecount', ceil($count/$RCMAIL->storage->get_pagesize()));
$OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox_name, 'EXISTS'));
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index e5fce9197..b95e1f1c6 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -139,7 +139,8 @@ function rcube_mail_ui()
if (rcmail.env.task == 'mail') {
rcmail.addEventListener('menu-open', menu_open)
.addEventListener('menu-save', menu_save)
- .addEventListener('responseafterlist', function(e){ switch_view_mode(rcmail.env.threading ? 'thread' : 'list') });
+ .addEventListener('responseafterlist', function(e){ switch_view_mode(rcmail.env.threading ? 'thread' : 'list', true) })
+ .addEventListener('responseaftersearch', function(e){ switch_view_mode(rcmail.env.threading ? 'thread' : 'list', true) });
var dragmenu = $('#dragmessagemenu');
if (dragmenu.length) {
@@ -730,9 +731,9 @@ function rcube_mail_ui()
/**
*
*/
- function switch_view_mode(mode)
+ function switch_view_mode(mode, force)
{
- if (!$('#mail'+mode+'mode').hasClass('disabled')) {
+ if (force || !$('#mail'+mode+'mode').hasClass('disabled')) {
$('#maillistmode, #mailthreadmode').removeClass('selected');
$('#mail'+mode+'mode').addClass('selected');
}