diff options
Diffstat (limited to 'skins/larry/ui.js')
-rw-r--r-- | skins/larry/ui.js | 7 |
1 files changed, 4 insertions, 3 deletions
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'); } |