Skip to content

Commit bcdbd83

Browse files
committed
prevent double message_setup_view_finished call for cached content
1 parent 6229402 commit bcdbd83

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/imap/site.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -670,15 +670,16 @@ var get_message_content = function(msg_part, uid, list_path, listParent, detail,
670670
$('.prev, .next').hide();
671671
}
672672
globals.auto_advance_email_enabled = Boolean(res.auto_advance_email_enabled);
673+
674+
if (callback) {
675+
callback(res)
676+
}
673677
};
674678

675679
if (!msg_part) {
676680
var msgContent = get_local_message_content(uid, list_path);
677681
if (msgContent) {
678682
onSuccess(msgContent);
679-
if (callback) {
680-
callback(msgContent)
681-
}
682683
}
683684
}
684685

@@ -712,8 +713,7 @@ var get_message_content = function(msg_part, uid, list_path, listParent, detail,
712713
}
713714
},
714715
[],
715-
false,
716-
callback
716+
false
717717
);
718718
}
719719
}

0 commit comments

Comments
 (0)