summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-01-14 20:53:40 +0100
committerAleksander Machniak <alec@alec.pl>2014-01-14 20:53:40 +0100
commit5f3c7e3920c36641466950d4e70a595d59376a88 (patch)
treef1add76cd878aea1dc330b7f6054d47c6791d7cd /program/js/app.js
parent8080554cf3dda8f799a714c202f61039ed224b86 (diff)
Make sure unread_children count (and class) on thread root is always updated when read status of a child row is changed
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 3c547566d..e89e85e52 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2054,7 +2054,6 @@ function rcube_webmail()
if (preview && this.message_list && this.message_list.rows[id] && this.message_list.rows[id].unread && this.env.preview_pane_mark_read >= 0) {
this.preview_read_timer = setTimeout(function() {
ref.set_message(id, 'unread', false);
- ref.update_thread_root(id, 'read');
if (ref.env.unread_counts[ref.env.mailbox]) {
ref.env.unread_counts[ref.env.mailbox] -= 1;
ref.set_unread_count(ref.env.mailbox, ref.env.unread_counts[ref.env.mailbox], ref.env.mailbox == 'INBOX');
@@ -2560,8 +2559,11 @@ function rcube_webmail()
if (!row)
return false;
- if (flag == 'unread')
+ if (flag == 'unread') {
+ if (row.unread != status)
+ this.update_thread_root(uid, status ? 'unread' : 'read');
row.unread = status;
+ }
else if(flag == 'deleted')
row.deleted = status;
else if (flag == 'replied')
@@ -2849,9 +2851,6 @@ function rcube_webmail()
this.set_message(a_uids[i], 'unread', (flag == 'unread' ? true : false));
this.http_post('mark', post_data, lock);
-
- for (i=0; i<len; i++)
- this.update_thread_root(a_uids[i], flag);
};
// set image to flagged or unflagged