message view header: Don't initalize multiple times.

The `initialize` function registers a click handler, and
previously it was being registered another time each time
one of these calls to `initialize()` happened. The only
other thing that happens in `initialize` is a call to
`render_title_area`, so this commit replaces the extra
calls to initialize with that.
This commit is contained in:
evykassirer
2023-06-20 19:26:37 -07:00
committed by Tim Abbott
parent 7ee827a24b
commit e360a896f6
2 changed files with 4 additions and 4 deletions

View File

@@ -90,7 +90,7 @@ function test_helper() {
stub(notifications, "redraw_title");
stub(search, "update_button_visibility");
stub(stream_list, "handle_narrow_activated");
stub(message_view_header, "initialize");
stub(message_view_header, "render_title_area");
stub(top_left_corner, "handle_narrow_activated");
stub(typing_events, "render_notifications_for_narrow");
stub(compose_recipient, "update_narrow_to_recipient_visibility");
@@ -198,7 +198,7 @@ run_test("basics", () => {
[top_left_corner, "handle_narrow_activated"],
[stream_list, "handle_narrow_activated"],
[typing_events, "render_notifications_for_narrow"],
[message_view_header, "initialize"],
[message_view_header, "render_title_area"],
[compose_recipient, "update_narrow_to_recipient_visibility"],
]);