modest_account_settings_set_display_name (priv->settings, display_name);
g_free (display_name);
g_free (provider_id);
+
+ /* This values are hardcoded for Fremantle */
+ modest_account_settings_set_retrieve_type (priv->settings,
+ MODEST_ACCOUNT_RETRIEVE_MESSAGES_AND_ATTACHMENTS);
+ modest_account_settings_set_retrieve_limit (priv->settings, 20);
}
if the mail operation has a source (this means that
was invoked by the user and not automatically by a
D-Bus method) */
- if (info->retrieve_all_cb && priv->source)
+ if (info->retrieve_all_cb && info->interactive)
ignore_limit = info->retrieve_all_cb (priv->source,
new_headers_array->len,
retrieve_limit);
new_headers = tny_simple_list_new ();
for (i=0; i < new_headers_array->len; i++) {
TnyHeader *header = TNY_HEADER (g_ptr_array_index (new_headers_array, i));
- tny_list_append (new_headers, G_OBJECT (header));
+ /* We want the first element to be the most recent
+ one, that's why we reverse the list */
+ tny_list_prepend (new_headers, G_OBJECT (header));
}
g_ptr_array_foreach (new_headers_array, (GFunc) g_object_unref, NULL);
g_ptr_array_free (new_headers_array, FALSE);
flags = tny_header_get_flags (header);
if (!(flags & TNY_HEADER_FLAG_SEEN)) {
- tny_list_append (actually_new_list, G_OBJECT (header));
+ /* Messages are ordered from most
+ recent to oldest. But we want to
+ show notifications starting from
+ the oldest message. That's why we
+ reverse the list */
+ tny_list_prepend (actually_new_list, G_OBJECT (header));
}
g_object_unref (header);
}