[geary/wip/conversation-polish: 20/26] Unb0rk use of iterator API



commit 4c7d98a1e39a1666b1078e098aa1943bfc1b035d
Author: Michael Gratton <mike vee net>
Date:   Thu Jan 31 18:11:51 2019 +1100

    Unb0rk use of iterator API
    
    Fixes inline parts occasionally showing up as attachments.

 src/client/conversation-viewer/conversation-email.vala | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-email.vala 
b/src/client/conversation-viewer/conversation-email.vala
index 31cd42e4..968ea9a1 100644
--- a/src/client/conversation-viewer/conversation-email.vala
+++ b/src/client/conversation-viewer/conversation-email.vala
@@ -1025,13 +1025,12 @@ public class ConversationEmail : Gtk.Box, Geary.BaseInterface {
     private void on_resource_loaded(string id) {
         Gee.Iterator<Geary.Attachment> displayed =
             this.displayed_attachments.iterator();
-        displayed.next();
         while (displayed.has_next()) {
+            displayed.next();
             Geary.Attachment? attachment = displayed.get();
             if (attachment.content_id == id) {
                 displayed.remove();
             }
-            displayed.next();
         }
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]