mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	We consistently either pass a `then_select_id` into narrow.activate, or were using the select_first_unread option. Now, we just compute select_first_unread based on the value of then_select_id.
		
			
				
	
	
		
			25 lines
		
	
	
		
			541 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			541 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
var tutorial = (function () {
 | 
						|
 | 
						|
var exports = {};
 | 
						|
 | 
						|
function set_tutorial_status(status, callback) {
 | 
						|
    return channel.post({
 | 
						|
        url:      '/json/users/me/tutorial_status',
 | 
						|
        data:     {status: JSON.stringify(status)},
 | 
						|
        success:  callback,
 | 
						|
    });
 | 
						|
}
 | 
						|
 | 
						|
exports.initialize = function () {
 | 
						|
    if (page_params.needs_tutorial) {
 | 
						|
        set_tutorial_status("started");
 | 
						|
        narrow.by('is', 'private', {trigger: 'sidebar'});
 | 
						|
    }
 | 
						|
};
 | 
						|
 | 
						|
return exports;
 | 
						|
}());
 | 
						|
if (typeof module !== 'undefined') {
 | 
						|
    module.exports = tutorial;
 | 
						|
}
 |