diff options
author | Carl Worth <cworth@cworth.org> | 2009-11-03 13:13:50 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-11-03 13:38:00 -0800 |
commit | aa34eb2a3761c770b485486d0f94564f5e925128 (patch) | |
tree | c798826f174c1af1b853c0a32eec4ac02ab3b2d6 /notmuch.c | |
parent | 0ceef70efdfaa082506e5298c0a031e626d83ea9 (diff) |
notmuch show: Remove custom "unread" hack, (printing tag in two locations).
I previously had a hack that special-cased the "unread" tag and
printed it on the same line as the message ID. But now that we are
printing all tags at the end of the one-line summary we don't need
this anymore. Get rid of it, and just read "unread" from the list of
tags just like any other tag.
Diffstat (limited to 'notmuch.c')
-rw-r--r-- | notmuch.c | 26 |
1 files changed, 2 insertions, 24 deletions
@@ -1068,25 +1068,6 @@ show_message_body (const char *filename) } static int -_message_is_unread (notmuch_message_t *message) -{ - notmuch_tags_t *tags; - const char *tag; - - for (tags = notmuch_message_get_tags (message); - notmuch_tags_has_more (tags); - notmuch_tags_advance (tags)) - { - tag = notmuch_tags_get (tags); - - if (strcmp (tag, "unread") == 0) - return 1; - } - - return 0; -} - -static int show_command (void *ctx, unused (int argc), unused (char *argv[])) { void *local = talloc_new (ctx); @@ -1096,7 +1077,6 @@ show_command (void *ctx, unused (int argc), unused (char *argv[])) notmuch_messages_t *messages; notmuch_message_t *message; int ret = 0; - int unread; const char *headers[] = { "Subject", "From", "To", "Cc", "Bcc", "Date" @@ -1135,11 +1115,9 @@ show_command (void *ctx, unused (int argc), unused (char *argv[])) notmuch_messages_advance (messages)) { message = notmuch_messages_get (messages); - unread = _message_is_unread (message); - printf ("\fmessage{ ID: %s %s\n", - notmuch_message_get_message_id (message), - unread ? "unread" : ""); + printf ("\fmessage{ ID: %s\n", + notmuch_message_get_message_id (message)); printf ("\fheader{\n"); |