mirror of https://github.com/zulip/zulip.git
pm-list-data: Remove unused `is_all_privates` function.
In commit 6f9e97921
, the last use of `pm_list_data.is_all_privates`
was removed when we restructured how private messages are shown
in the left sidebar. Removes the function since it is now no longer
relevant.
This commit is contained in:
parent
0a1904a6a7
commit
1ddc27d91b
|
@ -214,23 +214,6 @@ test("get_active_user_ids_string", () => {
|
|||
assert.equal(pm_list_data.get_active_user_ids_string(), "101,102");
|
||||
});
|
||||
|
||||
function private_filter() {
|
||||
return {
|
||||
operands(operand) {
|
||||
assert.equal(operand, "is");
|
||||
return ["private", "starred"];
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
test("is_all_privates", () => {
|
||||
assert.equal(narrow_state.filter(), undefined);
|
||||
assert.equal(pm_list_data.is_all_privates(), false);
|
||||
|
||||
narrow_state.set_current_filter(private_filter());
|
||||
assert.equal(pm_list_data.is_all_privates(), true);
|
||||
});
|
||||
|
||||
test("get_list_info", ({override}) => {
|
||||
let list_info;
|
||||
assert.equal(narrow_state.filter(), undefined);
|
||||
|
|
|
@ -79,16 +79,6 @@ export function get_conversations() {
|
|||
return display_objects;
|
||||
}
|
||||
|
||||
export function is_all_privates() {
|
||||
const filter = narrow_state.filter();
|
||||
|
||||
if (!filter) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return filter.operands("is").includes("private");
|
||||
}
|
||||
|
||||
// Designed to closely match topic_list_data.get_list_info().
|
||||
export function get_list_info(zoomed) {
|
||||
const conversations = get_conversations();
|
||||
|
|
Loading…
Reference in New Issue