summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-12-23 11:33:41 +0100
committerAleksander Machniak <alec@alec.pl>2013-12-23 11:33:41 +0100
commitac0fc383fd43e8955b0ab22f70463159b14c74b0 (patch)
tree3b0c5aafc0e8b6cb5b58d671f5f048ecb100f9ce /program/js
parent6b2b2eca5fa48720c4e5b31b9aae200a185dfc0e (diff)
Fix so message flags modified by another client are applied on the list on refresh (#1485186)
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 138fcbb13..a001a3bff 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -6923,6 +6923,16 @@ function rcube_webmail()
case 'refresh':
case 'check-recent':
+ // update message flags
+ $.each(this.env.recent_flags || {}, function(uid, flags) {
+ ref.set_message(uid, 'deleted', flags.deleted);
+ ref.set_message(uid, 'replied', flags.answered);
+ ref.set_message(uid, 'unread', !flags.seen);
+ ref.set_message(uid, 'forwarded', flags.forwarded);
+ ref.set_message(uid, 'flagged', flags.flagged);
+ });
+ delete this.env.recent_flags;
+
case 'getunread':
case 'search':
this.env.qsearch = null;
@@ -7246,13 +7256,18 @@ function rcube_webmail()
if (this.gui_objects.mailboxlist)
params._folderlist = 1;
- if (this.gui_objects.messagelist)
- params._list = 1;
if (this.gui_objects.quotadisplay)
params._quota = 1;
if (this.env.search_request)
params._search = this.env.search_request;
+ if (this.gui_objects.messagelist) {
+ params._list = 1;
+
+ // message uids for flag updates check
+ params._uids = $.map(this.message_list.rows, function(row, uid) { return uid; }).join(',');
+ }
+
return params;
};