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:
Lauryn Menard 2023-02-10 17:27:37 +01:00 committed by Tim Abbott
parent 0a1904a6a7
commit 1ddc27d91b
2 changed files with 0 additions and 27 deletions

View File

@ -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);

View File

@ -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();