mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	refactor: Move maybe_get_stream_name from stream_data to sub_store.
				
					
				
			This commit moves `maybe_get_stream_name` function from `stream_data` to `sub_store` as it didn't had any dependency on `stream_data` and it also helps us to cut off dependency on `stream_data` for some of the modules including `user_topics`.
This commit is contained in:
		@@ -145,9 +145,9 @@ test("basics", () => {
 | 
			
		||||
    assert.ok(!stream_data.is_muted(social.stream_id));
 | 
			
		||||
    assert.ok(stream_data.is_muted(denmark.stream_id));
 | 
			
		||||
 | 
			
		||||
    assert.equal(stream_data.maybe_get_stream_name(), undefined);
 | 
			
		||||
    assert.equal(stream_data.maybe_get_stream_name(social.stream_id), "social");
 | 
			
		||||
    assert.equal(stream_data.maybe_get_stream_name(42), undefined);
 | 
			
		||||
    assert.equal(sub_store.maybe_get_stream_name(), undefined);
 | 
			
		||||
    assert.equal(sub_store.maybe_get_stream_name(social.stream_id), "social");
 | 
			
		||||
    assert.equal(sub_store.maybe_get_stream_name(42), undefined);
 | 
			
		||||
 | 
			
		||||
    stream_data.set_realm_default_streams([denmark]);
 | 
			
		||||
    assert.ok(stream_data.is_default_stream_id(denmark.stream_id));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user