Fix compilation with valac git master.
This commit is contained in:
parent
fe30f19366
commit
5a0b85e586
5 changed files with 18 additions and 17 deletions
|
|
@ -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<ImapDB.EmailIdentifier, Geary.EmailFlags>? get_email_flags_async(
|
||||
Gee.Collection<ImapDB.EmailIdentifier> ids, Cancellable? cancellable) throws Error {
|
||||
Gee.Map<ImapDB.EmailIdentifier, Geary.EmailFlags>? map = null;
|
||||
|
||||
internal async Gee.Map<ImapDB.EmailIdentifier, Geary.EmailFlags>? get_email_flags_async(
|
||||
Gee.Collection<EmailIdentifier> ids, Cancellable? cancellable) throws Error {
|
||||
Gee.Map<EmailIdentifier, Geary.EmailFlags>? 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<Geary.EmailIdentifier, Geary.Email.Field> map = new Gee.HashMap<
|
||||
Geary.EmailIdentifier, Geary.Email.Field>();
|
||||
Gee.HashMap<ImapDB.EmailIdentifier,Geary.Email.Field> map = new Gee.HashMap<
|
||||
ImapDB.EmailIdentifier,Geary.Email.Field>();
|
||||
|
||||
// Break up the work
|
||||
Gee.List<ImapDB.EmailIdentifier> list = new Gee.ArrayList<Geary.EmailIdentifier>();
|
||||
Gee.List<ImapDB.EmailIdentifier> list = new Gee.ArrayList<ImapDB.EmailIdentifier>();
|
||||
Gee.Iterator<ImapDB.EmailIdentifier> 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<ImapDB.EmailIdentifier, Geary.EmailFlags> 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);
|
||||
|
|
|
|||
|
|
@ -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<Geary.Folder> to_remove
|
||||
= Geary.traverse<Gee.Map.Entry<FolderPath, Imap.Folder>>(existing_folders)
|
||||
= Geary.traverse<Gee.Map.Entry<FolderPath,Geary.Folder>>(existing_folders)
|
||||
.filter(e => !remote_folders.has_key(e.key) && !local_only.has_key(e.key))
|
||||
.map<Geary.Folder>(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<MinimalFolder> engine_added = new Gee.ArrayList<Geary.Folder>();
|
||||
Gee.Collection<MinimalFolder> engine_added = new Gee.ArrayList<MinimalFolder>();
|
||||
engine_added.add_all(build_folders(folders_to_build));
|
||||
|
||||
Gee.ArrayList<Geary.Folder> engine_removed = new Gee.ArrayList<Geary.Folder>();
|
||||
|
|
|
|||
|
|
@ -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<ImapDB.EmailIdentifier>) to_mark, flags_to_add, flags_to_remove, cancellable);
|
||||
replay_queue.schedule(mark);
|
||||
|
||||
yield mark.wait_for_ready_async(cancellable);
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
private class Geary.ImapEngine.MarkEmail : Geary.ImapEngine.SendReplayOperation {
|
||||
private MinimalFolder engine;
|
||||
private Gee.List<Geary.EmailIdentifier> to_mark = new Gee.ArrayList<Geary.EmailIdentifier>();
|
||||
private Gee.List<ImapDB.EmailIdentifier> to_mark = new Gee.ArrayList<ImapDB.EmailIdentifier>();
|
||||
private Geary.EmailFlags? flags_to_add;
|
||||
private Geary.EmailFlags? flags_to_remove;
|
||||
private Gee.Map<ImapDB.EmailIdentifier, Geary.EmailFlags>? original_flags = null;
|
||||
private Cancellable? cancellable;
|
||||
|
||||
public MarkEmail(MinimalFolder engine, Gee.List<Geary.EmailIdentifier> to_mark,
|
||||
public MarkEmail(MinimalFolder engine, Gee.List<ImapDB.EmailIdentifier> 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<ImapDB.EmailIdentifier> ids) {
|
||||
// don't bother updating on server or backing out locally
|
||||
if (original_flags != null)
|
||||
Collection.map_unset_all_keys<ImapDB.EmailIdentifier, Geary.EmailFlags>(original_flags, ids);
|
||||
Collection.map_unset_all_keys<EmailIdentifier, Geary.EmailFlags>(original_flags, ids);
|
||||
}
|
||||
|
||||
public override void get_ids_to_be_remote_removed(Gee.Collection<ImapDB.EmailIdentifier> ids) {
|
||||
|
|
@ -50,7 +50,7 @@ private class Geary.ImapEngine.MarkEmail : Geary.ImapEngine.SendReplayOperation
|
|||
cancellable);
|
||||
|
||||
// Notify using flags from DB.
|
||||
Gee.Map<Geary.EmailIdentifier, Geary.EmailFlags>? map = yield engine.local_folder.get_email_flags_async(
|
||||
Gee.Map<EmailIdentifier, Geary.EmailFlags>? 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);
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public class Geary.Imap.MessageFlagsDecoder : Geary.Imap.FetchDataDecoder {
|
|||
}
|
||||
|
||||
protected override MessageData decode_list(ListParameter listp) throws ImapError {
|
||||
Gee.List<Flag> flags = new Gee.ArrayList<Flag>();
|
||||
Gee.List<MessageFlag> flags = new Gee.ArrayList<MessageFlag>();
|
||||
for (int ctr = 0; ctr < listp.size; ctr++)
|
||||
flags.add(new MessageFlag(listp.get_as_string(ctr).ascii));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue