From: Thomas Roessler Date: Sat, 27 Jan 2001 13:41:11 +0000 (+0000) Subject: More improvements to the recvattach collapsing. X-Git-Tag: mutt-1-3-14-rel~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b4da8bf2642d5c348b09f868dc288925d3fb1ab;p=mutt More improvements to the recvattach collapsing. --- diff --git a/recvattach.c b/recvattach.c index 75180f46..a055d5af 100644 --- a/recvattach.c +++ b/recvattach.c @@ -910,26 +910,19 @@ void mutt_view_attachments (HEADER *hdr) menu->redraw = REDRAW_FULL; if (op != OP_ATTACH_COLLAPSE) break; + if (!idx[menu->current]->content->collapsed) + break; /* else fall through - hack! */ case OP_ATTACH_COLLAPSE: - if (!idx[menu->current]->content->collapsed) + if (!idx[menu->current]->content->parts) { - if (!idx[menu->current]->content->parts) - { - mutt_error _("There are no subparts to hide!"); - break; - } - attach_collapse (idx[menu->current]->content, 1, 0, 1); + mutt_error _("There are no subparts to show!"); + break; } + if (!idx[menu->current]->content->collapsed) + attach_collapse (idx[menu->current]->content, 1, 0, 1); else - { - if (!idx[menu->current]->content->parts) - { - mutt_error _("There are no subparts to show!"); - break; - } attach_collapse (idx[menu->current]->content, 0, 1, 1); - } mutt_update_attach_index (cur, &idx, &idxlen, &idxmax, menu); break;