topic_list: Generalize use of TopicListWidget.

We introduce a different class to be used for left sidebar which
inherits TopicListWidget. More specifically, we allow the
children classes of TopicListWidget to pass their own method to
filter topics. This will later be used by inbox view when showing
channel view in center pane.
This commit is contained in:
Aman Agrawal
2025-04-09 17:32:04 +05:30
committed by Tim Abbott
parent 88f71f28cc
commit f5714a0c55
4 changed files with 32 additions and 9 deletions

View File

@@ -918,7 +918,11 @@ export function set_event_handlers({
let topics = stream_topic_history.get_recent_topic_names(stream_id);
const navigate_to_stream = (): void => {
const topic_list_info = topic_list_data.get_list_info(stream_id, false, "");
const topic_list_info = topic_list_data.get_list_info(
stream_id,
false,
(topic_names: string[]) => topic_names,
);
const topic_item = topic_list_info.items[0];
if (topic_item !== undefined) {
const destination_url = hash_util.by_channel_topic_permalink(