mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-12 12:03:17 +02:00
Fixed timing issues
This commit is contained in:
@@ -2103,6 +2103,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, false, "doubletap");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -2265,6 +2267,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, false, "flag");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -2516,6 +2520,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, false, "attachment");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -2685,6 +2691,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, false, "attachment");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -2928,6 +2936,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, false, "outbox/drafts");
|
||||
|
||||
if (message.identity != null) {
|
||||
// Identity can be deleted
|
||||
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
@@ -3225,6 +3235,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, false, "seen");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -3361,6 +3373,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, false, "resync");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -3536,6 +3550,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, false, "headers");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -3573,6 +3590,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, false, "raw");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -4524,6 +4544,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, false, "keywords");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -4583,11 +4605,22 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
String keyword = args.getString("keyword");
|
||||
|
||||
DB db = DB.getInstance(context);
|
||||
EntityMessage message = db.message().getMessage(id);
|
||||
if (message == null)
|
||||
return null;
|
||||
try {
|
||||
db.beginTransaction();
|
||||
|
||||
EntityMessage message = db.message().getMessage(id);
|
||||
if (message == null)
|
||||
return null;
|
||||
|
||||
EntityOperation.queue(context, message, EntityOperation.KEYWORD, keyword, true);
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, false, "keyword=" + keyword);
|
||||
|
||||
EntityOperation.queue(context, message, EntityOperation.KEYWORD, keyword, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user