mirror of https://github.com/zulip/zulip.git
Don't show special empty narrow messages for complex narrows.
Previously we showed an empty narrow error message determined entirely by the first operator, even though there could have been multiple operators.
This commit is contained in:
parent
cea079279e
commit
2867c019cb
|
@ -524,8 +524,12 @@ function pick_empty_narrow_banner() {
|
|||
var first_term = current_filter.operators()[0];
|
||||
var first_operator = first_term.operator;
|
||||
var first_operand = first_term.operand;
|
||||
var num_operators = current_filter.operators().length;
|
||||
|
||||
if (first_operator === "is") {
|
||||
if (num_operators !== 1) {
|
||||
// For multi-operator narrows, we just use the default banner
|
||||
return default_banner;
|
||||
} else if (first_operator === "is") {
|
||||
if (first_operand === "starred") {
|
||||
// You have no starred messages.
|
||||
return $("#empty_star_narrow_message");
|
||||
|
|
Loading…
Reference in New Issue