_loadPreviewCallback: function(resp)
{
- var ppuid, row, search, tmp,
+ var bg, ppuid, row, search, tmp,
pm = $('previewMsg'),
r = resp.response,
t = $('msgHeadersContent').down('THEAD');
+ bg = (this.pp &&
+ (this.pp.imapuid != r.uid || this.pp.view != r.mailbox));
+
if (!r.error) {
search = this.viewport.getSelection().search({ imapuid: { equal: [ r.uid ] }, view: { equal: [ r.mailbox ] } });
if (search.size()) {
}
}
- if (this.pp &&
- (this.pp.imapuid != r.uid ||
- this.pp.view != r.mailbox)) {
- return;
- }
-
if (r.error || this.viewport.getSelected().size() != 1) {
- if (r.error) {
- DimpCore.showNotifications([ { type: r.errortype, message: r.error } ]);
+ if (!bg) {
+ if (r.error) {
+ DimpCore.showNotifications([ { type: r.errortype, message: r.error } ]);
+ }
+ this.clearPreviewPane();
}
- this.clearPreviewPane();
return;
}
this.ppcache[ppuid] = resp;
this.ppfifo.push(ppuid);
+ if (bg) {
+ return;
+ }
+
DimpCore.removeAddressLinks(pm);
// Add subject