mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user