recent_topics: Split into three modules.

We split recent_topics module into recent_topics_(ui + data + util).

This allows us to reduce cyclical dependencies which were
created due to large list of imports in recent topics. Also, this
refactor on its own makes sense.
This commit is contained in:
Aman Agrawal
2021-06-10 12:18:46 +00:00
committed by Tim Abbott
parent eb1d8b1a96
commit 88454307cd
29 changed files with 194 additions and 178 deletions

View File

@@ -20,7 +20,8 @@ import * as narrow_state from "./narrow_state";
import * as notifications from "./notifications";
import {page_params} from "./page_params";
import * as people from "./people";
import * as recent_topics from "./recent_topics";
import * as recent_topics_ui from "./recent_topics_ui";
import * as recent_topics_util from "./recent_topics_util";
import * as reload_state from "./reload_state";
import * as stream_bar from "./stream_bar";
import * as stream_data from "./stream_data";
@@ -299,8 +300,8 @@ export function respond_to_message(opts) {
let message;
let msg_type;
if (recent_topics.is_visible()) {
message = recent_topics.get_focused_row_message();
if (recent_topics_util.is_visible()) {
message = recent_topics_ui.get_focused_row_message();
if (message === undefined) {
// Open empty compose with nothing pre-filled since
// user is not focused on any table row.