mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-14 21:04:53 +00:00
Fixed the ActiveSync issue marking mails as read when downloading them
This commit is contained in:
@@ -245,7 +245,7 @@ function mailListToggleMessageThread(row, cell) {
|
||||
|
||||
/* Triggered when clicking on the read/unread dot of a message row or
|
||||
* through the contextual menu. */
|
||||
function mailListToggleMessagesRead(row) {
|
||||
function mailListToggleMessagesRead(row, force_mark_as_read) {
|
||||
var selectedRowsId = [];
|
||||
if (row) {
|
||||
selectedRowsId = [row.id];
|
||||
@@ -265,10 +265,13 @@ function mailListToggleMessagesRead(row) {
|
||||
action = 'markMessageRead';
|
||||
markread = true;
|
||||
}
|
||||
else {
|
||||
else if (!force_mark_as_read) {
|
||||
action = 'markMessageUnread';
|
||||
markread = false;
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = 0; i < selectedRowsId.length; i++) {
|
||||
var msguid = selectedRowsId[i].split('_')[1];
|
||||
@@ -1224,8 +1227,6 @@ function loadMessage(msguid) {
|
||||
{ 'mailbox': Mailer.currentMailbox,
|
||||
'msguid': msguid,
|
||||
'seenStateHasChanged': seenStateHasChanged });
|
||||
// Warning: We assume the user can set the read/unread flag of the message.
|
||||
markMailInWindow(window, msguid, true);
|
||||
}
|
||||
else {
|
||||
div.innerHTML = cachedMessage['text'];
|
||||
@@ -1643,6 +1644,9 @@ function loadMessageCallback(http) {
|
||||
cachedMessage['text'] = http.responseText;
|
||||
if (cachedMessage['text'].length < 30000)
|
||||
storeCachedMessage(cachedMessage);
|
||||
|
||||
// We mark the mail as read
|
||||
mailListToggleMessagesRead($("row_" + msguid), true);
|
||||
}
|
||||
}
|
||||
else if (http.status == 404) {
|
||||
|
||||
Reference in New Issue
Block a user