Roundcube Community Forum

Release Support => Release Discussion => Topic started by: unicorn on January 17, 2011, 10:53:56 AM

Title: Reload message_list
Post by: unicorn on January 17, 2011, 10:53:56 AM
Hello,

can I reload message_list via command "list" without loosing of selected message in preview frame?

We have extra column in message_list and we need reload this list time to time.

Now when I run rcmail.command('list', rcmail.env.mailbox); then preview frame is reloaded with default watermark.html.

Thank you for suggestion.
Title: Reload message_list
Post by: JohnDoh on January 18, 2011, 02:21:39 AM
i think what you need to do is get the current selection first....

Quotecur_sel = rcmail.message_list.get_selection();

then reload the list and then reapply the selection

Quoteif (cur_sel) {
   for (var i in cur_sel)
      rcmail.message_list.select_row(cur_sel, CONTROL_KEY);
}
Title: Reload message_list
Post by: unicorn on January 18, 2011, 08:15:18 AM
Thank you JohnDoh for your answer, it's useful for me.