[geary: 7/9] Merge branch 'wip/fix-reference-tracking'
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary: 7/9] Merge branch 'wip/fix-reference-tracking'
- Date: Tue, 6 Mar 2018 05:30:27 +0000 (UTC)
commit a75391c676b42c643f2b5d1a6226a12a523a4116
Merge: c9b5386 ab346b8
Author: Michael James Gratton <mike vee net>
Date: Mon Mar 5 23:34:06 2018 +1100
Merge branch 'wip/fix-reference-tracking'
src/client/application/geary-application.vala | 13 +-
src/client/application/geary-controller.vala | 513 ++++++++++----------
src/client/components/client-web-view.vala | 29 +-
src/client/components/main-window.vala | 12 +-
src/client/composer/contact-list-store.vala | 6 +-
.../conversation-list-cell-renderer.vala | 6 +-
.../conversation-list/conversation-list-store.vala | 1 +
.../conversation-list/conversation-list-view.vala | 10 +-
.../conversation-viewer/conversation-email.vala | 7 +-
.../conversation-viewer/conversation-list-box.vala | 14 +-
.../conversation-viewer/conversation-message.vala | 7 +-
.../conversation-viewer/conversation-viewer.vala | 8 +-
src/client/folder-list/folder-list-tree.vala | 10 +-
src/client/notification/libnotify.vala | 8 +-
src/client/notification/new-messages-monitor.vala | 12 +-
src/client/sidebar/sidebar-branch.vala | 2 +-
src/client/sidebar/sidebar-common.vala | 2 +-
src/engine/api/geary-account-information.vala | 35 +-
src/engine/api/geary-base-object.vala | 217 +++++++--
src/engine/api/geary-engine.vala | 3 +-
src/engine/imap-db/imap-db-account.vala | 14 +-
src/engine/imap-db/outbox/smtp-outbox-folder.vala | 13 +-
.../imap-engine/imap-engine-email-prefetcher.vala | 6 +-
.../imap-engine/imap-engine-generic-account.vala | 15 +-
src/engine/util/util-idle-manager.vala | 8 +-
src/engine/util/util-timeout-manager.vala | 12 +-
26 files changed, 584 insertions(+), 399 deletions(-)
---
diff --cc src/client/application/geary-controller.vala
index db89246,c07518b..87eaf98
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@@ -1366,24 -1398,21 +1398,22 @@@ public class GearyController : Geary.Ba
current_folder,
Geary.Folder.OpenFlags.NO_DELAY,
ConversationListStore.REQUIRED_FIELDS,
- MIN_CONVERSATION_COUNT);
+ MIN_CONVERSATION_COUNT
+ );
- if (inboxes.values.contains(current_folder)) {
- // Inbox selected, clear new messages if visible
- clear_new_messages("do_select_folder (inbox)", null);
- }
-
current_conversations.scan_completed.connect(on_scan_completed);
- current_conversations.scan_completed.connect(on_conversation_count_changed);
current_conversations.scan_error.connect(on_scan_error);
- current_conversations.seed_completed.connect(on_conversation_count_changed);
+
+ current_conversations.scan_completed.connect(on_conversation_count_changed);
current_conversations.conversations_added.connect(on_conversation_count_changed);
current_conversations.conversations_removed.connect(on_conversation_count_changed);
-
- if (!current_conversations.is_monitoring)
- yield current_conversations.start_monitoring_async(conversation_cancellable);
-
+
+ clear_new_messages("do_select_folder", null);
+
+ yield this.current_conversations.start_monitoring_async(
+ this.cancellable_folder
+ );
+
select_folder_mutex.release(ref mutex_token);
debug("Switched to %s", folder.to_string());
@@@ -2841,26 -2854,10 +2844,30 @@@
}
}
+ private void on_scan_completed() {
+ // Done scanning. Check if we have enough messages to fill
+ // the conversation list; if not, trigger a load_more();
+ if (!main_window.conversation_list_has_scrollbar()) {
+ debug("Not enough messages, loading more for folder %s", current_folder.to_string());
+ on_load_more();
+ }
+ }
+
+ private void on_scan_error(Geary.App.ConversationMonitor monitor, Error err) {
+ // XXX determine the problem better here
+ report_problem(
+ new Geary.AccountProblemReport(
+ Geary.ProblemType.GENERIC_ERROR,
+ monitor.base_folder.account.information,
+ err
+ )
+ );
+ }
+
+ private void on_account_unavailable(Geary.AccountInformation info) {
+ close_account(info);
+ }
+
private void on_save_attachments(Gee.Collection<Geary.Attachment> attachments) {
if (attachments.size == 1) {
this.save_attachment_to_file.begin(attachments.to_array()[0], null);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]