summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortill <till@php.net>2008-03-25 00:48:16 +0000
committertill <till@php.net>2008-03-25 00:48:16 +0000
commit4bca672a9d7198a09eed0878f26078d0c5a69128 (patch)
tree3f86247d457da16dbc4f315c2e26be04fcff6516
parent7635d21b4c128e383e61b27981872200c13bf4d5 (diff)
* committing patch from #1484906
-rw-r--r--program/js/app.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/program/js/app.js b/program/js/app.js
index ec5fac3c2..fa78c24a8 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1525,12 +1525,16 @@ function rcube_webmail()
{
// mark all message rows as read/unread
var icn_src;
+ var res_uids = new Array();
var rows = this.message_list.rows;
for (var i=0; i<a_uids.length; i++)
{
uid = a_uids[i];
- if (rows[uid])
+ // check if flag isn't set yet
+ if (rows[uid] && ((flag=='unread' && !rows[uid].unread) || (flag=='read' && rows[uid].unread)))
{
+ res_uids[res_uids.length] = uid;
+
rows[uid].unread = (flag=='unread' ? true : false);
if (rows[uid].classname.indexOf('unread')<0 && rows[uid].unread)
@@ -1556,8 +1560,9 @@ function rcube_webmail()
rows[uid].icon.src = icn_src;
}
}
-
- this.http_post('mark', '_uid='+a_uids.join(',')+'&_flag='+flag);
+
+ if (res_uids.length)
+ this.http_post('mark', '_uid='+res_uids.join(',')+'&_flag='+flag);
};
// mark all message rows as deleted/undeleted