mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	pm_list: Show correct unread unread counts.
We only update the `.private_messages_header` here since unread_counts of `.expanded_private_message` are updated via `pm_list.update_private_messages`. This fixes the bug of PMs in `.expanded_private_message` having the same unread count as `private_messages_header`. Since we rerender the DOM of `.expanded_private_message` every time we update unread count of PMs, we don't need to manually update them here. Also, we always keep them on display since there is no real need to toggle them. They are not visible when they have 0 unread counts via `.zero_count`.
This commit is contained in:
		@@ -161,7 +161,7 @@ test("update_dom_with_unread_counts", (override) => {
 | 
			
		||||
    override(narrow_state, "active", () => true);
 | 
			
		||||
 | 
			
		||||
    const total_count = $.create("total-count-stub");
 | 
			
		||||
    const private_li = $(".top_left_private_messages");
 | 
			
		||||
    const private_li = $(".top_left_private_messages .private_messages_header");
 | 
			
		||||
    private_li.set_find_results(".unread_count", total_count);
 | 
			
		||||
 | 
			
		||||
    counts = {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user