Fix clicking on link to message when sending outside this narrow

(imported from commit 6eeeb3b4c06021be21f48c8c5f2869904cd13b09)
This commit is contained in:
Leo Franchi
2014-01-28 15:09:23 -05:00
parent ffb816391c
commit 91fb4f6b8c

View File

@@ -461,6 +461,21 @@ $(function () {
if (typeof(bridge) !== 'undefined' && window.bridge === undefined) {
window.bridge = bridge;
}
$(document).on('message_id_changed', function (event) {
var old_id = event.old_id, new_id = event.new_id;
// If a message ID that we're currently storing (as a link) has changed,
// update that link as well
_.each($('#out-of-view-notification a'), function (e) {
var elem = $(e);
var msgid = elem.data('msgid');
if (msgid === old_id) {
elem.data('msgid', new_id);
}
});
});
});
exports.register_click_handlers = function () {