* berto is smarter than i am
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Thu, 20 Dec 2007 17:04:45 +0000 (17:04 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Thu, 20 Dec 2007 17:04:45 +0000 (17:04 +0000)
pmo-trunk-r3951

src/modest-tny-msg.c

index 69745e5..dfb6d13 100644 (file)
@@ -732,6 +732,11 @@ get_new_to (TnyMsg *msg, TnyHeader *header, const gchar* from,
                        g_free (new_to);
                        new_to = tmp;
                }
                        g_free (new_to);
                        new_to = tmp;
                }
+
+               /* remove duplicate entries */
+               gchar *tmp = modest_text_utils_remove_duplicate_addresses (new_to);
+               g_free (new_to);
+               new_to = tmp;
                
                /* now, strip me (the new From:) from the new_to, but only if
                 * there are >1 addresses there */
                
                /* now, strip me (the new From:) from the new_to, but only if
                 * there are >1 addresses there */
@@ -740,11 +745,6 @@ get_new_to (TnyMsg *msg, TnyHeader *header, const gchar* from,
                        g_free (new_to);
                        new_to = tmp;
                }
                        g_free (new_to);
                        new_to = tmp;
                }
-               
-               /* remove duplicate entries */
-               gchar *tmp = modest_text_utils_remove_duplicate_addresses (new_to);
-               g_free (new_to);
-               new_to = tmp;
        }
 
        return new_to;
        }
 
        return new_to;