mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	message_fetch: Use first unread anchor for home view.
This fixes one of our oldest important user experience issues, namely that if you never visit the home view, the Zulip webapp would often load "deep in the past" because the pointer had not advanced. Fixes #1529.
This commit is contained in:
		@@ -138,7 +138,7 @@ function message_range(start, end) {
 | 
			
		||||
const initialize_data = {
 | 
			
		||||
    initial_fetch: {
 | 
			
		||||
        req: {
 | 
			
		||||
            anchor: 444,
 | 
			
		||||
            anchor: 'first_unread',
 | 
			
		||||
            num_before: 200,
 | 
			
		||||
            num_after: 200,
 | 
			
		||||
            client_gravatar: true,
 | 
			
		||||
 
 | 
			
		||||
@@ -402,7 +402,9 @@ exports.initialize = function () {
 | 
			
		||||
        // near: narrow query, we want to select a specific message.
 | 
			
		||||
        anchor = page_params.initial_pointer;
 | 
			
		||||
    } else {
 | 
			
		||||
        anchor = page_params.pointer;
 | 
			
		||||
        // Otherwise, we should just use the first unread message in
 | 
			
		||||
        // the user's unmuted history as our anchor.
 | 
			
		||||
        anchor = "first_unread";
 | 
			
		||||
    }
 | 
			
		||||
    exports.load_messages({
 | 
			
		||||
        anchor: anchor,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user