refactor: Extract color_class module.

This breaks some indirect dependencies on subs
and message_view_header.
This commit is contained in:
Steve Howell
2021-03-24 16:54:23 +00:00
committed by Tim Abbott
parent f3b1e723e0
commit 57d79e8fd6
8 changed files with 70 additions and 77 deletions

View File

@@ -6,6 +6,7 @@ import render_draft_table_body from "../templates/draft_table_body.hbs";
import * as blueslip from "./blueslip";
import * as browser_history from "./browser_history";
import * as color_class from "./color_class";
import * as compose from "./compose";
import * as compose_actions from "./compose_actions";
import * as compose_fade from "./compose_fade";
@@ -16,7 +17,6 @@ import * as markdown from "./markdown";
import * as narrow from "./narrow";
import * as overlays from "./overlays";
import * as people from "./people";
import * as stream_color from "./stream_color";
import * as stream_data from "./stream_data";
import * as timerender from "./timerender";
import * as util from "./util";
@@ -253,7 +253,7 @@ export function format_draft(draft) {
is_stream: true,
stream,
stream_color: draft_stream_color,
dark_background: stream_color.get_color_class(draft_stream_color),
dark_background: color_class.get_css_class(draft_stream_color),
topic: draft_topic,
raw_content: draft.content,
time_stamp,