From 5a0b85e58639f5a9b9e2a1aa6b1882da6b2e6648 Mon Sep 17 00:00:00 2001 From: Michael James Gratton Date: Tue, 4 Oct 2016 00:06:54 +1100 Subject: [PATCH] Fix compilation with valac git master. --- src/engine/imap-db/imap-db-folder.vala | 16 ++++++++-------- src/engine/imap-engine/imap-engine-generic-account.vala | 4 ++-- src/engine/imap-engine/imap-engine-minimal-folder.vala | 5 +++-- .../imap-engine/replay-ops/imap-engine-mark-email.vala | 8 ++++---- src/engine/imap/response/imap-fetch-data-decoder.vala | 2 +- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/engine/imap-db/imap-db-folder.vala b/src/engine/imap-db/imap-db-folder.vala index 81e963a..b3e02e8 100644 --- a/src/engine/imap-db/imap-db-folder.vala +++ b/src/engine/imap-db/imap-db-folder.vala @@ -870,10 +870,10 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics { if (unread_status.size > 0) unread_updated(unread_status); } - - public async Gee.Map? get_email_flags_async( - Gee.Collection ids, Cancellable? cancellable) throws Error { - Gee.Map? map = null; + + internal async Gee.Map? get_email_flags_async( + Gee.Collection ids, Cancellable? cancellable) throws Error { + Gee.Map? map = null; yield db.exec_transaction_async(Db.TransactionType.RO, (cx, cancellable) => { map = do_get_email_flags(cx, ids, cancellable); @@ -1085,11 +1085,11 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics { if (ids.size == 0) return null; - Gee.HashMap map = new Gee.HashMap< - Geary.EmailIdentifier, Geary.Email.Field>(); + Gee.HashMap map = new Gee.HashMap< + ImapDB.EmailIdentifier,Geary.Email.Field>(); // Break up the work - Gee.List list = new Gee.ArrayList(); + Gee.List list = new Gee.ArrayList(); Gee.Iterator iter = ids.iterator(); while (iter.next()) { list.add(iter.get()); @@ -1576,7 +1576,7 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics { Db.Statement fetch_stmt = cx.prepare("SELECT flags FROM MessageTable WHERE id=?"); Gee.Map map = new Gee.HashMap< - Geary.EmailIdentifier, Geary.EmailFlags>(); + ImapDB.EmailIdentifier, Geary.EmailFlags>(); // TODO: Unroll this loop foreach (LocationIdentifier location in locs) { fetch_stmt.reset(Db.ResetScope.CLEAR_BINDINGS); diff --git a/src/engine/imap-engine/imap-engine-generic-account.vala b/src/engine/imap-engine/imap-engine-generic-account.vala index 16e04da..afcd9f0 100644 --- a/src/engine/imap-engine/imap-engine-generic-account.vala +++ b/src/engine/imap-engine/imap-engine-generic-account.vala @@ -807,7 +807,7 @@ private abstract class Geary.ImapEngine.GenericAccount : Geary.Account { // If path in local but not remote (and isn't local-only, i.e. the Outbox), need to remove it Gee.ArrayList to_remove - = Geary.traverse>(existing_folders) + = Geary.traverse>(existing_folders) .filter(e => !remote_folders.has_key(e.key) && !local_only.has_key(e.key)) .map(e => (Geary.Folder) e.value) .to_array_list(); @@ -834,7 +834,7 @@ private abstract class Geary.ImapEngine.GenericAccount : Geary.Account { debug("Unable to fetch local folder after cloning: %s", convert_err.message); } } - Gee.Collection engine_added = new Gee.ArrayList(); + Gee.Collection engine_added = new Gee.ArrayList(); engine_added.add_all(build_folders(folders_to_build)); Gee.ArrayList engine_removed = new Gee.ArrayList(); diff --git a/src/engine/imap-engine/imap-engine-minimal-folder.vala b/src/engine/imap-engine/imap-engine-minimal-folder.vala index 09486f4..c1a8d99 100644 --- a/src/engine/imap-engine/imap-engine-minimal-folder.vala +++ b/src/engine/imap-engine/imap-engine-minimal-folder.vala @@ -1412,8 +1412,9 @@ private class Geary.ImapEngine.MinimalFolder : Geary.Folder, Geary.FolderSupport Geary.EmailFlags? flags_to_add, Geary.EmailFlags? flags_to_remove, Cancellable? cancellable = null) throws Error { check_open("mark_email_async"); - - MarkEmail mark = new MarkEmail(this, to_mark, flags_to_add, flags_to_remove, cancellable); + check_ids("mark_email_async", to_mark); + + MarkEmail mark = new MarkEmail(this, (Gee.List) to_mark, flags_to_add, flags_to_remove, cancellable); replay_queue.schedule(mark); yield mark.wait_for_ready_async(cancellable); diff --git a/src/engine/imap-engine/replay-ops/imap-engine-mark-email.vala b/src/engine/imap-engine/replay-ops/imap-engine-mark-email.vala index 21968c8..4f326d2 100644 --- a/src/engine/imap-engine/replay-ops/imap-engine-mark-email.vala +++ b/src/engine/imap-engine/replay-ops/imap-engine-mark-email.vala @@ -6,13 +6,13 @@ private class Geary.ImapEngine.MarkEmail : Geary.ImapEngine.SendReplayOperation { private MinimalFolder engine; - private Gee.List to_mark = new Gee.ArrayList(); + private Gee.List to_mark = new Gee.ArrayList(); private Geary.EmailFlags? flags_to_add; private Geary.EmailFlags? flags_to_remove; private Gee.Map? original_flags = null; private Cancellable? cancellable; - public MarkEmail(MinimalFolder engine, Gee.List to_mark, + public MarkEmail(MinimalFolder engine, Gee.List to_mark, Geary.EmailFlags? flags_to_add, Geary.EmailFlags? flags_to_remove, Cancellable? cancellable = null) { base("MarkEmail", OnError.RETRY); @@ -28,7 +28,7 @@ private class Geary.ImapEngine.MarkEmail : Geary.ImapEngine.SendReplayOperation public override void notify_remote_removed_ids(Gee.Collection ids) { // don't bother updating on server or backing out locally if (original_flags != null) - Collection.map_unset_all_keys(original_flags, ids); + Collection.map_unset_all_keys(original_flags, ids); } public override void get_ids_to_be_remote_removed(Gee.Collection ids) { @@ -50,7 +50,7 @@ private class Geary.ImapEngine.MarkEmail : Geary.ImapEngine.SendReplayOperation cancellable); // Notify using flags from DB. - Gee.Map? map = yield engine.local_folder.get_email_flags_async( + Gee.Map? map = yield engine.local_folder.get_email_flags_async( original_flags.keys, cancellable); if (map != null && map.size > 0) engine.replay_notify_email_flags_changed(map); diff --git a/src/engine/imap/response/imap-fetch-data-decoder.vala b/src/engine/imap/response/imap-fetch-data-decoder.vala index ed94ed3..5464111 100644 --- a/src/engine/imap/response/imap-fetch-data-decoder.vala +++ b/src/engine/imap/response/imap-fetch-data-decoder.vala @@ -95,7 +95,7 @@ public class Geary.Imap.MessageFlagsDecoder : Geary.Imap.FetchDataDecoder { } protected override MessageData decode_list(ListParameter listp) throws ImapError { - Gee.List flags = new Gee.ArrayList(); + Gee.List flags = new Gee.ArrayList(); for (int ctr = 0; ctr < listp.size; ctr++) flags.add(new MessageFlag(listp.get_as_string(ctr).ascii));