1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-29 11:15:51 +00:00

Prevent downloading attachments of local (moved) messages

This commit is contained in:
M66B 2019-05-04 21:12:03 +02:00
parent 18d63048c1
commit c028297c57

View file

@ -235,17 +235,20 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
@Override
protected Void onExecute(Context context, Bundle args) {
long id = args.getLong("id");
long message = args.getLong("message");
long mid = args.getLong("message");
long sequence = args.getInt("sequence");
DB db = DB.getInstance(context);
try {
db.beginTransaction();
EntityMessage message = db.message().getMessage(mid);
if (message == null || message.uid == null)
return null;
db.attachment().setProgress(id, 0);
EntityMessage msg = db.message().getMessage(message);
EntityOperation.queue(context, db, msg, EntityOperation.ATTACHMENT, sequence);
EntityOperation.queue(context, db, message, EntityOperation.ATTACHMENT, sequence);
db.setTransactionSuccessful();
} finally {