zulip/web/src/message_lists.js
Anders Kaseorg c1675913a2 web: Move web app to ‘web’ directory.
Ever since we started bundling the app with webpack, there’s been less
and less overlap between our ‘static’ directory (files belonging to
the frontend app) and Django’s interpretation of the ‘static’
directory (files served directly to the web).

Split the app out to its own ‘web’ directory outside of ‘static’, and
remove all the custom collectstatic --ignore rules.  This makes it
much clearer what’s actually being served to the web, and what’s being
bundled by webpack.  It also shrinks the release tarball by 3%.

Signed-off-by: Anders Kaseorg <[email protected]>
2023-02-23 16:04:17 -08:00

28 lines
725 B
JavaScript

import {Filter} from "./filter";
import * as message_list from "./message_list";
import * as recent_topics_util from "./recent_topics_util";
export let home;
export let current;
export function set_current(msg_list) {
current = msg_list;
}
export function all_rendered_message_lists() {
const rendered_message_lists = [home];
if (current !== home && !recent_topics_util.is_visible()) {
rendered_message_lists.push(current);
}
return rendered_message_lists;
}
export function initialize() {
home = new message_list.MessageList({
table_name: "zhome",
filter: new Filter([{operator: "in", operand: "home"}]),
excludes_muted_topics: true,
});
current = home;
}