mirror of https://github.com/zulip/zulip.git
narrow_banner: Refactor empty banner is: operands to use switch/case.
This commit is contained in:
parent
00c493a75a
commit
f85f0c4b0b
|
@ -109,15 +109,16 @@ function pick_empty_narrow_banner() {
|
|||
// For other multi-operator narrows, we just use the default banner
|
||||
return default_banner;
|
||||
} else if (first_operator === "is") {
|
||||
if (first_operand === "starred") {
|
||||
switch (first_operand) {
|
||||
case "starred":
|
||||
// You have no starred messages.
|
||||
return $("#empty_star_narrow_message");
|
||||
} else if (first_operand === "mentioned") {
|
||||
case "mentioned":
|
||||
return $("#empty_narrow_all_mentioned");
|
||||
} else if (first_operand === "private") {
|
||||
case "private":
|
||||
// You have no private messages.
|
||||
return $("#empty_narrow_all_private_message");
|
||||
} else if (first_operand === "unread") {
|
||||
case "unread":
|
||||
// You have no unread messages.
|
||||
return $("#no_unread_narrow_message");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue