]> granicus.if.org Git - mutt/commitdiff
More improvements to the recvattach collapsing.
authorThomas Roessler <roessler@does-not-exist.org>
Sat, 27 Jan 2001 13:41:11 +0000 (13:41 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Sat, 27 Jan 2001 13:41:11 +0000 (13:41 +0000)
recvattach.c

index 75180f46e6c94e8399af78527393c54571d605cd..a055d5af22ce2e73273f0ea33538427040281412 100644 (file)
@@ -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;