mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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:
		@@ -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"],
 | 
			
		||||
    ]);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user