narrow: Remove some narrow_deactivated.zulip event handling.

This commit is contained in:
Shubham Dhama
2018-08-06 21:31:04 +05:30
committed by Tim Abbott
parent 209dd6dd37
commit e908da7831
3 changed files with 4 additions and 4 deletions

View File

@@ -586,14 +586,14 @@ exports.delete_message = function (msg_id) {
});
};
$(document).on('narrow_deactivated.zulip', function () {
exports.handle_narrow_deactivated = function () {
_.each(currently_editing_messages, function (elem, idx) {
if (current_msg_list.get(idx) !== undefined) {
var row = current_msg_list.get_row(idx);
current_msg_list.show_edit_message(row, elem);
}
});
});
};
return exports;
}());

View File

@@ -611,6 +611,8 @@ function handle_post_narrow_deactivate_processes() {
top_left_corner.handle_narrow_deactivated();
stream_list.handle_narrow_deactivated();
compose.update_stream_button_for_stream();
message_edit.handle_narrow_deactivated();
widgetize.set_widgets_for_list();
$(document).trigger($.Event('narrow_deactivated.zulip', {msg_list: current_msg_list}));

View File

@@ -82,8 +82,6 @@ exports.set_widgets_for_list = function () {
});
};
$(document).on('narrow_deactivated.zulip', exports.set_widgets_for_list);
exports.handle_event = function (widget_event) {
var widget_elem = widget_contents[widget_event.message_id];