(js) Fix images flickering in mail threads mode

This commit is contained in:
Francis Lachapelle
2019-06-20 11:53:13 -04:00
parent f29793b781
commit b90723c9d6
3 changed files with 9 additions and 6 deletions
+2 -2
View File
@@ -756,7 +756,7 @@
// Attachment
if ([self hasMessageAttachment])
[msg addObject: [NSString stringWithFormat: @"<img src=\"%@\"/>", [self urlForResourceFilename: @"title_attachment_14x14.png"]]];
[msg addObject: [NSString stringWithFormat: @"<img src=\"%@\">", [self urlForResourceFilename: @"title_attachment_14x14.png"]]];
else
[msg addObject: @""];
@@ -786,7 +786,7 @@
else
msgIconStatus = @"unread.png";
[msg addObject: [NSString stringWithFormat: @"<img src=\"%@\" class=\"mailerReadIcon\" title=\"%@\" title-markread=\"%@\" title-markunread=\"%@\" id=\"%@\"/>",
[msg addObject: [NSString stringWithFormat: @"<img src=\"%@\" class=\"mailerReadIcon\" title=\"%@\" title-markread=\"%@\" title-markunread=\"%@\" id=\"%@\">",
[self urlForResourceFilename: msgIconStatus],
[self labelForKey: @"Mark Unread"],
[self labelForKey: @"Mark Read"],
+5 -2
View File
@@ -239,7 +239,7 @@ function mailListToggleMessageThread(row, cell) {
else {
row.removeClassName('openedThread');
row.addClassName('closedThread');
var img = createElement("img", null, null, { src: ResourcesURL + '/arrow-right.png' });
var img = createElement("img", null, 'messageThread', { src: ResourcesURL + '/arrow-right.png' });
cell.insertBefore(img, cell.firstChild);
}
while ((row = row.next()) && row.hasClassName('thread')) {
@@ -1052,6 +1052,7 @@ function messageListCallback(row, data, isNew) {
}
else {
row.addClassName('openedThread');
displayThreadElement = false;
}
}
}
@@ -1072,7 +1073,9 @@ function messageListCallback(row, data, isNew) {
for (var j = 0; j < cells.length; j++) {
var cell = cells[j];
var cellType = Mailer.columnsOrder[j];
if (data[cellType]) cell.innerHTML = data[cellType];
if (data[cellType]) {
if (cell.innerHTML != data[cellType]) cell.innerHTML = data[cellType];
}
else cell.innerHTML = '&nbsp;';
}
}