Commit fcbab20f authored by Milan Crha's avatar Milan Crha

message-list: Remove unneeded code

The ml_uid_nodemap_insert() is called a lot when building the tree and
its call to reference the folder of the MessageList was not needed,
because the 'folder' was not used in the function other than to check
whether it's non-NULL. Similarly in the ml_uid_nodemap_remove().
parent 3c3bee6b
......@@ -4569,15 +4569,11 @@ ml_uid_nodemap_insert (MessageList *message_list,
GNode *parent,
gint row)
{
CamelFolder *folder;
GNode *node;
const gchar *uid;
time_t date;
guint flags;
folder = message_list_ref_folder (message_list);
g_return_val_if_fail (folder != NULL, NULL);
if (parent == NULL)
parent = message_list->priv->tree_model_root;
......@@ -4608,8 +4604,6 @@ ml_uid_nodemap_insert (MessageList *message_list,
}
}
g_object_unref (folder);
return node;
}
......@@ -4617,12 +4611,8 @@ static void
ml_uid_nodemap_remove (MessageList *message_list,
CamelMessageInfo *info)
{
CamelFolder *folder;
const gchar *uid;
folder = message_list_ref_folder (message_list);
g_return_if_fail (folder != NULL);
uid = camel_message_info_get_uid (info);
if (uid == message_list->priv->newest_read_uid) {
......@@ -4637,8 +4627,6 @@ ml_uid_nodemap_remove (MessageList *message_list,
g_hash_table_remove (message_list->uid_nodemap, uid);
g_clear_object (&info);
g_object_unref (folder);
}
/* only call if we have a tree model */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment