mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	TextField is used to allow users to set long stream + topic narrow names in the urls. We currently restrict users to only set "all_messages" and "recent_topics" as narrows. This commit achieves 3 things: * Removes recent topics as the default view which loads when hash is empty. * Loads default_view when hash is empty. * Loads default_view on pressing escape key when it is unhandled by other present UI elements. NOTE: After this commit loading zulip with an empty hash will automatically set hash to default_view. Ideally, we'd just display the default view without a hash, but that involves extra complexity. One exception is when user is trying to load an overlay directly, i.e. zulip is loaded with an overlay hash. In this case, we render recent topics is background irrespective of default_view. We consider this last detail to be a bug not important enough to block adding this setting.
		
			
				
	
	
		
			19 lines
		
	
	
		
			395 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			395 B
		
	
	
	
		
			Python
		
	
	
	
	
	
# Generated by Django 3.1.7 on 2021-03-10 04:14
 | 
						|
 | 
						|
from django.db import migrations, models
 | 
						|
 | 
						|
 | 
						|
class Migration(migrations.Migration):
 | 
						|
 | 
						|
    dependencies = [
 | 
						|
        ("zerver", "0310_jsonfield"),
 | 
						|
    ]
 | 
						|
 | 
						|
    operations = [
 | 
						|
        migrations.AddField(
 | 
						|
            model_name="userprofile",
 | 
						|
            name="default_view",
 | 
						|
            field=models.TextField(default="recent_topics"),
 | 
						|
        ),
 | 
						|
    ]
 |