summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-09-18 10:14:16 +0000
committeralecpl <alec@alec.pl>2008-09-18 10:14:16 +0000
commit095d05ef00674553be1d8ee693cfee26fc544510 (patch)
treed8139cd553931c3d5575a090a1957e68b37b757d /program/js/app.js
parent9281884ff0c2e15118e559d666c243512208ebfd (diff)
#1484805: fix next/last page buttons when new message is added to the list + remove last message
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 0f074f375..6ebc55669 100644
--- a/program/js/app.js
+++ b/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);
+ }
};