mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Prettier would do this anyway, but it’s separated out for a more reviewable diff. Generated by ESLint. Signed-off-by: Anders Kaseorg <anders@zulip.com>
		
			
				
	
	
		
			30 lines
		
	
	
		
			640 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			640 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
const render_pm_list_item = require("../templates/pm_list_item.hbs");
 | 
						|
 | 
						|
exports.keyed_pm_li = (convo) => {
 | 
						|
    const render = () => render_pm_list_item(convo);
 | 
						|
 | 
						|
    const eq = (other) => _.isEqual(convo, other.convo);
 | 
						|
 | 
						|
    const key = convo.user_ids_string;
 | 
						|
 | 
						|
    return {
 | 
						|
        key: key,
 | 
						|
        render: render,
 | 
						|
        convo: convo,
 | 
						|
        eq: eq,
 | 
						|
    };
 | 
						|
};
 | 
						|
 | 
						|
exports.pm_ul = (convos) => {
 | 
						|
    const attrs = [
 | 
						|
        ["class", "expanded_private_messages"],
 | 
						|
        ["data-name", "private"],
 | 
						|
    ];
 | 
						|
    return vdom.ul({
 | 
						|
        attrs: attrs,
 | 
						|
        keyed_nodes: convos.map(exports.keyed_pm_li),
 | 
						|
    });
 | 
						|
};
 | 
						|
 | 
						|
window.pm_list_dom = exports;
 |