mirror of https://github.com/zulip/zulip.git
filter: Show stream and topic title for near link narrows.
Updates the `filter.get_title` logic to return the stream name for narrows that include the stream, topic and near operators. That way the browser/tab title remains the same for these views, which have a particular scroll offset.
This commit is contained in:
parent
ca36f23d9f
commit
7172a6ef13
|
@ -662,7 +662,10 @@ export class Filter {
|
|||
get_title() {
|
||||
// Nice explanatory titles for common views.
|
||||
const term_types = this.sorted_term_types();
|
||||
if (term_types.length === 2 && _.isEqual(term_types, ["stream", "topic"])) {
|
||||
if (
|
||||
(term_types.length === 3 && _.isEqual(term_types, ["stream", "topic", "near"])) ||
|
||||
(term_types.length === 2 && _.isEqual(term_types, ["stream", "topic"]))
|
||||
) {
|
||||
if (!this._sub) {
|
||||
const search_text = this.operands("stream")[0];
|
||||
return $t({defaultMessage: "Unknown stream #{search_text}"}, {search_text});
|
||||
|
|
Loading…
Reference in New Issue