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:
parent
18d63048c1
commit
c028297c57
1 changed files with 6 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue