From c18b7b920d1fbf96ca7f4d473e71a5622fbf40a8 Mon Sep 17 00:00:00 2001 From: alec Date: Thu, 18 Sep 2008 10:14:16 +0000 Subject: #1484805: fix next/last page buttons when new message is added to the list + remove last message git-svn-id: https://svn.roundcube.net/trunk@1819 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/js/app.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'roundcubemail/program/js/app.js') diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index 0f074f375..6ebc55669 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -3559,6 +3559,14 @@ function rcube_webmail() row.appendChild(col); this.message_list.insert_row(row, attop); + + // remove 'old' row + if (attop && this.env.pagesize && this.message_list.rowcount > this.env.pagesize) + { + var uid = this.message_list.get_last_row(); + this.message_list.remove_row(uid); + this.message_list.clear_selection(uid); + } }; -- cgit v1.2.3