- Fix message list and preview pane cleanup on search request

release-0.6
alecpl 15 years ago
parent 8ed0152e51
commit be9d4d2ab7

@ -1836,18 +1836,14 @@ function rcube_webmail()
page = 1;
this.env.current_page = page;
this.select_all_mode = false;
this.show_contentframe(false);
this.env.messages = {};
}
// unselect selected messages and clear the list and message data
this.clear_message_list();
if (mbox != this.env.mailbox || (mbox == this.env.mailbox && !page && !sort))
url += '&_refresh=1';
// unselect selected messages
this.last_selected = 0;
if (this.message_list) {
this.message_list.clear_selection();
}
this.select_folder(mbox, this.env.mailbox);
this.env.mailbox = mbox;
@ -1869,6 +1865,16 @@ function rcube_webmail()
}
};
this.clear_message_list = function()
{
this.env.messages = {};
this.last_selected = 0;
this.show_contentframe(false);
if (this.message_list)
this.message_list.clear(true);
};
// send remote request to load message list
this.list_mailbox_remote = function(mbox, page, add_url)
{
@ -3183,7 +3189,7 @@ function rcube_webmail()
if (value != '') {
var addurl = '';
if (this.message_list) {
this.message_list.clear();
this.clear_message_list();
if (this.env.search_mods) {
var mods = this.env.search_mods[this.env.mailbox] ? this.env.search_mods[this.env.mailbox] : this.env.search_mods['*'];
if (mods) {

Loading…
Cancel
Save