Commit 9e499bd8 authored by Milan Crha's avatar Milan Crha

Bug 747031 - Messages Not Marked as Read When Changing Folder

parent 61b4dbe7
......@@ -162,6 +162,9 @@ mail_paned_view_message_list_built_cb (EMailView *view,
g_free (folder_uri);
if (!message_list_contains_uid (message_list, uid))
e_mail_reader_unset_folder_just_selected (E_MAIL_READER (view));
/* Use selection fallbacks if UID is not found. */
message_list_select_uid (message_list, uid, TRUE);
......
......@@ -4884,6 +4884,19 @@ e_mail_reader_avoid_next_mark_as_seen (EMailReader *reader)
priv->avoid_next_mark_as_seen = TRUE;
}
void
e_mail_reader_unset_folder_just_selected (EMailReader *reader)
{
EMailReaderPrivate *priv;
g_return_if_fail (reader != NULL);
priv = E_MAIL_READER_GET_PRIVATE (reader);
g_return_if_fail (priv != NULL);
priv->folder_was_just_selected = FALSE;
}
/**
* e_mail_reader_composer_created:
* @reader: an #EMailReader
......
......@@ -181,6 +181,8 @@ void e_mail_reader_create_charset_menu
void e_mail_reader_show_search_bar (EMailReader *reader);
void e_mail_reader_avoid_next_mark_as_seen
(EMailReader *reader);
void e_mail_reader_unset_folder_just_selected
(EMailReader *reader);
void e_mail_reader_composer_created (EMailReader *reader,
EMsgComposer *composer,
CamelMimeMessage *message);
......
......@@ -6206,3 +6206,15 @@ exit:
regen_data_unref (old_regen_data);
}
}
gboolean
message_list_contains_uid (MessageList *message_list,
const gchar *uid)
{
g_return_val_if_fail (IS_MESSAGE_LIST (message_list), FALSE);
if (!uid || !*uid || !message_list->priv->folder)
return FALSE;
return g_hash_table_lookup (message_list->uid_nodemap, uid) != NULL;
}
......@@ -211,6 +211,8 @@ void message_list_save_state (MessageList *message_list);
void message_list_sort_uids (MessageList *message_list,
GPtrArray *uids);
gboolean message_list_contains_uid (MessageList *message_list,
const gchar *uid);
G_END_DECLS
......
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