mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	message scrolling: Move early-exit code higher.
This avoids some unnecessary computation and will simplify testing.
This commit is contained in:
		@@ -804,9 +804,6 @@ MessageListView.prototype = {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        var info = message_viewport.message_viewport_info();
 | 
			
		||||
        var scroll_limit = this._scroll_limit(selected_row, info);
 | 
			
		||||
 | 
			
		||||
        if (new_messages_height <= 0) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
@@ -827,6 +824,9 @@ MessageListView.prototype = {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        var info = message_viewport.message_viewport_info();
 | 
			
		||||
        var scroll_limit = this._scroll_limit(selected_row, info);
 | 
			
		||||
 | 
			
		||||
        // This next decision is fairly debatable.  For a big message that
 | 
			
		||||
        // would push the pointer off the screen, we do a partial autoscroll,
 | 
			
		||||
        // which has the following implications:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user