[geary/wip/713150-conversations] Properly update folder's email count when marking for removal
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/713150-conversations] Properly update folder's email count when marking for removal
- Date: Tue, 3 Mar 2015 02:02:21 +0000 (UTC)
commit f5458f4bd34590a7aeab4737f7d3cce222a1467c
Author: Jim Nelson <jim yorba org>
Date: Mon Mar 2 18:01:54 2015 -0800
Properly update folder's email count when marking for removal
This is important for new conversation monitor code to work well.
src/engine/app/app-conversation-monitor.vala | 8 ++++----
src/engine/imap-db/imap-db-folder.vala | 3 +++
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/engine/app/app-conversation-monitor.vala b/src/engine/app/app-conversation-monitor.vala
index 2ce5789..dea19f4 100644
--- a/src/engine/app/app-conversation-monitor.vala
+++ b/src/engine/app/app-conversation-monitor.vala
@@ -794,9 +794,9 @@ public class Geary.App.ConversationMonitor : BaseObject {
int initial_message_count = get_email_count();
- debug("fill_window_async: is_insert=%s min_window_count=%d conversations.size=%d primary_ids.size=%d
initial_message_count=%d",
+ debug("fill_window_async: is_insert=%s min_window_count=%d conversations.size=%d primary_ids.size=%d
folder emails=%d initial_message_count=%d",
is_insert.to_string(), min_window_count, conversations.size,
primary_email_id_to_conversation.size,
- initial_message_count);
+ folder.properties.email_total, initial_message_count);
// only do local-load if the Folder isn't completely opened, otherwise this operation
// will block other (more important) operations while it waits for the folder to
@@ -839,8 +839,8 @@ public class Geary.App.ConversationMonitor : BaseObject {
rescheduled = true;
}
- debug("fill_window_async: loaded from %s, email_count=%d primary_ids.size=%d conversations.size=%d
rescheduled=%s",
+ debug("fill_window_async: loaded from %s, email_count=%d primary_ids.size=%d folder emails=%d
conversations.size=%d rescheduled=%s",
low_id != null ? low_id.to_string() : "(null)", get_email_count(),
primary_email_id_to_conversation.size,
- conversations.size, rescheduled.to_string());
+ folder.properties.email_total, conversations.size, rescheduled.to_string());
}
}
diff --git a/src/engine/imap-db/imap-db-folder.vala b/src/engine/imap-db/imap-db-folder.vala
index 87a80ce..7044a9a 100644
--- a/src/engine/imap-db/imap-db-folder.vala
+++ b/src/engine/imap-db/imap-db-folder.vala
@@ -1009,6 +1009,9 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics {
if (unread_count > 0)
properties.set_status_unseen(properties.email_unread - unread_count);
+ properties.set_select_examine_message_count(Numeric.int_floor(
+ properties.select_examine_messages - removed_ids.size, 0));
+
return (removed_ids.size > 0) ? removed_ids : null;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]