Fixed set_unread_message() in multifolder mode

pull/195/head
Aleksander Machniak 11 years ago
parent d28daec918
commit ae48735f2c

@ -2139,11 +2139,13 @@ function rcube_webmail()
if (!self || !self.message_list)
return;
self.set_message(id, 'unread', false);
// this may fail in multifolder mode
if (self.set_message(id, 'unread', false) === false)
self.set_message(id + '-' + folder, 'unread', false);
if (self.env.unread_counts[folder] > 0) {
self.env.unread_counts[folder] -= 1;
self.set_unread_count(folder, self.env.unread_counts[folder], folder == 'INBOX');
self.set_unread_count(folder, self.env.unread_counts[folder], folder == 'INBOX' && !self.is_multifolder_listing());
}
};

Loading…
Cancel
Save