[evolution-data-server/email-factory] Fix unread count to be on the server.
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/email-factory] Fix unread count to be on the server.
- Date: Tue, 14 Jun 2011 14:08:45 +0000 (UTC)
commit 26f5933121f8f9130d1c3e05d33f722a8ea6d7da
Author: Srinivasa Ragavan <srini linux intel com>
Date: Tue Jun 14 17:07:18 2011 +0300
Fix unread count to be on the server.
camel/providers/imapx/camel-imapx-store.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index 4d2d656..782a808 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -485,7 +485,8 @@ static void
fill_fi(CamelStore *store, CamelFolderInfo *fi, guint32 flags)
{
CamelFolder *folder;
-
+ CamelService *service = (CamelService *)store;
+
folder = camel_object_bag_peek(store->folders, fi->full_name);
if (folder) {
CamelIMAPXSummary *ims;
@@ -495,7 +496,11 @@ fill_fi(CamelStore *store, CamelFolderInfo *fi, guint32 flags)
else
ims = (CamelIMAPXSummary *) camel_imapx_summary_new (folder, NULL);
- fi->unread = ((CamelFolderSummary *)ims)->unread_count;
+ if (camel_url_get_param (service->url, "mobile"))
+ fi->unread = ((CamelIMAPXFolder *) folder)->unread_on_server;
+ else
+ fi->unread = ((CamelFolderSummary *)ims)->unread_count;
+
fi->total = ((CamelFolderSummary *)ims)->saved_count;
if (!folder->summary)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]