|
|
|
@ -38,7 +38,6 @@ import android.widget.TextView;
|
|
|
|
|
import android.widget.Toast;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.io.FileNotFoundException;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
@ -174,7 +173,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
|
|
|
|
DB db = DB.getInstance(context);
|
|
|
|
|
EntityAttachment attachment = db.attachment().getAttachment(id);
|
|
|
|
|
if (attachment == null)
|
|
|
|
|
throw new FileNotFoundException();
|
|
|
|
|
return null;
|
|
|
|
|
db.attachment().setDownloaded(id, null);
|
|
|
|
|
attachment.getFile(context).delete();
|
|
|
|
|
db.attachment().deleteAttachment(id);
|
|
|
|
|