[evolution-data-server] Bug 791016 - [Camel] Fix a compiler warning at folder_summary_update_counts_by_flags()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 791016 - [Camel] Fix a compiler warning at folder_summary_update_counts_by_flags()
- Date: Fri, 1 Dec 2017 08:49:47 +0000 (UTC)
commit 879be784ab361e952f3011a5ff0c807fcccf537a
Author: Philip Withnall <withnall endlessm com>
Date: Fri Dec 1 09:48:55 2017 +0100
Bug 791016 - [Camel] Fix a compiler warning at folder_summary_update_counts_by_flags()
src/camel/camel-folder-summary.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/camel/camel-folder-summary.c b/src/camel/camel-folder-summary.c
index f966e8e..dfca052 100644
--- a/src/camel/camel-folder-summary.c
+++ b/src/camel/camel-folder-summary.c
@@ -427,10 +427,8 @@ folder_summary_update_counts_by_flags (CamelFolderSummary *summary,
unread = 0;
if (unread) {
- summary->priv->unread_count += unread;
-
- if (summary->priv->unread_count < 0)
- summary->priv->unread_count = 0;
+ if (unread > 0 || summary->priv->unread_count)
+ summary->priv->unread_count += unread;
g_object_notify (summary_object, "unread-count");
changed = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]