Roundcube Community Forum

 

Reload message_list

Started by unicorn, January 17, 2011, 10:53:56 AM

Previous topic - Next topic

unicorn

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.

JohnDoh

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);
}
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

unicorn

Thank you JohnDoh for your answer, it's useful for me.