Fix tab bar for embedded topic narrows.

(imported from commit 4c63478b1899c22f3d0be5651e2eb82aecdaaa4a)
This commit is contained in:
Tim Abbott 2014-01-16 18:18:21 -05:00
parent 907e9688fe
commit 1edcbfb8b0
1 changed files with 6 additions and 1 deletions

View File

@ -22,8 +22,13 @@ function make_tab_data() {
tabs.push(make_tab("All Messages", "#narrow/in/all", undefined, "root"));
} else if (page_params.narrow !== undefined) {
tabs.push(make_tab("Stream " + page_params.narrow_stream,
hashchange.operators_to_hash(page_params.narrow[0]),
hashchange.operators_to_hash([page_params.narrow[0]]),
page_params.narrow_stream, 'stream'));
if (page_params.narrow_topic !== undefined) {
tabs.push(make_tab("Topic " + page_params.narrow_topic,
hashchange.operators_to_hash(page_params.narrow),
null));
}
} else {
tabs.push(make_tab("Home", "#", "home", "root"));
}