mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Add subscribe button in narrowed view when stream has no messages.
A temporary message appears on successful subscription, with a button offering to unsubscribe in case the user subscribed by accident.
This commit is contained in:
		@@ -512,7 +512,16 @@ MessageListView.prototype = {
 | 
			
		||||
        if (last_message_group !== undefined) {
 | 
			
		||||
            list.last_message_historical = _.last(last_message_group.message_containers).msg.historical;
 | 
			
		||||
        }
 | 
			
		||||
        list.update_trailing_bookend();
 | 
			
		||||
 | 
			
		||||
        var stream_name = narrow.stream();
 | 
			
		||||
        if (stream_name !== undefined) {
 | 
			
		||||
            // If user narrows to a stream, doesn't update
 | 
			
		||||
            // trailing bookend if user is subscribed.
 | 
			
		||||
            var sub = stream_data.get_sub(stream_name);
 | 
			
		||||
            if (!sub.subscribed) {
 | 
			
		||||
                list.update_trailing_bookend();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (list === current_msg_list) {
 | 
			
		||||
            // Update the fade.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user