aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/em-folder-tree-model.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index aae547a23d..1369f3d1ea 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -894,11 +894,18 @@ folder_created_cb (CamelStore *store,
CamelFolderInfo *fi,
EMFolderTreeModel *model)
{
+ EMFolderTreeModelStoreInfo *si;
+
/* We only want created events to do more
* work if we don't support subscriptions. */
if (camel_store_supports_subscriptions (store))
return;
+ /* process "folder-created" event only when store already loaded */
+ si = em_folder_tree_model_lookup_store_info (model, store);
+ if (si == NULL || g_hash_table_size (si->full_hash) == 0)
+ return;
+
folder_subscribed_cb (store, fi, model);
}