mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 19:06:09 +00:00
filter: Combine stream narrow cases in filter.get_title.
This commit is contained in:
committed by
Tim Abbott
parent
0901ccdb47
commit
8ccd416e3b
@@ -664,7 +664,8 @@ export class Filter {
|
|||||||
const term_types = this.sorted_term_types();
|
const term_types = this.sorted_term_types();
|
||||||
if (
|
if (
|
||||||
(term_types.length === 3 && _.isEqual(term_types, ["stream", "topic", "near"])) ||
|
(term_types.length === 3 && _.isEqual(term_types, ["stream", "topic", "near"])) ||
|
||||||
(term_types.length === 2 && _.isEqual(term_types, ["stream", "topic"]))
|
(term_types.length === 2 && _.isEqual(term_types, ["stream", "topic"])) ||
|
||||||
|
(term_types.length === 1 && _.isEqual(term_types, ["stream"]))
|
||||||
) {
|
) {
|
||||||
if (!this._sub) {
|
if (!this._sub) {
|
||||||
const search_text = this.operands("stream")[0];
|
const search_text = this.operands("stream")[0];
|
||||||
@@ -697,12 +698,6 @@ export class Filter {
|
|||||||
return $t({defaultMessage: "All messages including muted streams"});
|
return $t({defaultMessage: "All messages including muted streams"});
|
||||||
case "streams-public":
|
case "streams-public":
|
||||||
return $t({defaultMessage: "Messages in all public streams"});
|
return $t({defaultMessage: "Messages in all public streams"});
|
||||||
case "stream":
|
|
||||||
if (!this._sub) {
|
|
||||||
const search_text = this.operands("stream")[0];
|
|
||||||
return $t({defaultMessage: "Unknown stream #{search_text}"}, {search_text});
|
|
||||||
}
|
|
||||||
return this._sub.name;
|
|
||||||
case "is-starred":
|
case "is-starred":
|
||||||
return $t({defaultMessage: "Starred messages"});
|
return $t({defaultMessage: "Starred messages"});
|
||||||
case "is-mentioned":
|
case "is-mentioned":
|
||||||
|
|||||||
Reference in New Issue
Block a user