58 lines
1.8 KiB
Diff
58 lines
1.8 KiB
Diff
--- camel/camel-folder-summary.c
|
|
+++ camel/camel-folder-summary.c
|
|
@@ -2074,25 +2074,24 @@ camel_folder_summary_touch(CamelFolderSummary *s)
|
|
void
|
|
camel_folder_summary_clear(CamelFolderSummary *s)
|
|
{
|
|
-#if 0
|
|
- int i;
|
|
+ d(printf ("\ncamel_folder_summary_clearcalled \n"));
|
|
+ s->flags &= ~CAMEL_SUMMARY_DIRTY;
|
|
|
|
CAMEL_SUMMARY_LOCK(s, summary_lock);
|
|
if (camel_folder_summary_count(s) == 0) {
|
|
CAMEL_SUMMARY_UNLOCK(s, summary_lock);
|
|
return;
|
|
}
|
|
+
|
|
+ g_ptr_array_foreach (s->uids, (GFunc) camel_pstring_free, NULL);
|
|
+ g_ptr_array_free (s->uids, TRUE);
|
|
+ s->uids = g_ptr_array_new ();
|
|
+ s->visible_count = s->deleted_count = s->unread_count = 0;
|
|
|
|
- for (i=0;i<s->messages->len;i++)
|
|
- camel_message_info_free(s->messages->pdata[i]);
|
|
+ g_hash_table_destroy(s->loaded_infos);
|
|
+ s->loaded_infos = g_hash_table_new(g_str_hash, g_str_equal);
|
|
|
|
- g_ptr_array_set_size(s->messages, 0);
|
|
- g_hash_table_destroy(s->messages_uid);
|
|
- s->messages_uid = g_hash_table_new(g_str_hash, g_str_equal);
|
|
- s->flags |= CAMEL_SUMMARY_DIRTY;
|
|
- s->meta_summary->msg_expunged = TRUE;
|
|
CAMEL_SUMMARY_UNLOCK(s, summary_lock);
|
|
-#endif
|
|
}
|
|
|
|
/* FIXME: This is non-sense. Neither an exception is passed,
|
|
--- camel/camel-vee-folder.c
|
|
+++ camel/camel-vee-folder.c
|
|
@@ -2064,8 +2064,16 @@ vee_set_expression(CamelVeeFolder *vf, const char *query)
|
|
}
|
|
|
|
/* Recreate the table when the query changes, only if we are not setting it first */
|
|
- if (vf->expression)
|
|
+ if (vf->expression) {
|
|
+ CamelFolderSummary *s = ((CamelFolder *)vf)->summary;
|
|
+ camel_folder_summary_clear (s);
|
|
camel_db_recreate_vfolder (((CamelFolder *) vf)->parent_store->cdb_w, ((CamelFolder *) vf)->full_name, NULL);
|
|
+ s->junk_count = 0;
|
|
+ s->deleted_count = 0;
|
|
+ s->unread_count = 0;
|
|
+ s->visible_count = 0;
|
|
+ s->junk_not_deleted_count = 0;
|
|
+ }
|
|
|
|
|
|
g_free(vf->expression);
|