(cond_keyword): Use util_attribute_matches_flag.
Showing
1 changed file
with
1 additions
and
16 deletions
... | @@ -837,25 +837,10 @@ void | ... | @@ -837,25 +837,10 @@ void |
837 | cond_keyword (struct parsebuf *pb) | 837 | cond_keyword (struct parsebuf *pb) |
838 | { | 838 | { |
839 | char *s = _search_arg (pb); | 839 | char *s = _search_arg (pb); |
840 | int rc; | ||
841 | attribute_t attr = NULL; | 840 | attribute_t attr = NULL; |
842 | 841 | ||
843 | message_get_attribute (pb->msg, &attr); | 842 | message_get_attribute (pb->msg, &attr); |
844 | if (!strcmp (s, "\\Seen")) | 843 | _search_push (pb, util_attribute_matches_flag (attr, s)); |
845 | rc = attribute_is_seen (attr); | ||
846 | else if (!strcmp (s, "\\Answered")) | ||
847 | rc = attribute_is_answered (attr); | ||
848 | else if (!strcmp (s, "\\Flagged")) | ||
849 | rc = attribute_is_flagged (attr); | ||
850 | else if (!strcmp (s, "\\Deleted")) | ||
851 | rc = attribute_is_deleted (attr); | ||
852 | else if (!strcmp (s, "\\Draft")) | ||
853 | rc = attribute_is_draft (attr); | ||
854 | else if (!strcmp (s, "\\Recent")) | ||
855 | rc = attribute_is_recent (attr); | ||
856 | else | ||
857 | rc = 0; | ||
858 | _search_push (pb, rc); | ||
859 | } | 844 | } |
860 | 845 | ||
861 | void | 846 | void | ... | ... |
-
Please register or sign in to post a comment