Revert "Workaround server bug"

This reverts commit 9ac9b08f5f.
This commit is contained in:
M66B 2019-09-21 15:44:38 +02:00
parent e1e2334517
commit 898f7777ef
2 changed files with 0 additions and 28 deletions

View File

@ -23,7 +23,6 @@ import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;
import java.util.List;
@ -101,9 +100,6 @@ public interface DaoAttachment {
@Insert
long insertAttachment(EntityAttachment attachment);
@Update
int updateAttachment(EntityAttachment attachment);
@Query("DELETE FROM attachment" +
" WHERE id = :id")
int deleteAttachment(long id);

View File

@ -990,30 +990,6 @@ public class MessageHelper {
// Get data
AttachmentPart apart = attachments.get(index);
if (local.name == null && apart.attachment.name != null) {
local.name = apart.attachment.name;
db.attachment().updateAttachment(local);
Log.i("Updated name " + local);
}
if (local.disposition == null && apart.attachment.disposition != null) {
local.disposition = apart.attachment.disposition;
db.attachment().updateAttachment(local);
Log.i("Updated disposition " + local);
}
if (local.cid == null && apart.attachment.cid != null) {
local.cid = apart.attachment.cid;
db.attachment().updateAttachment(local);
Log.i("Updated cid " + local);
}
if (local.size == null && apart.attachment.size != null) {
local.size = apart.attachment.size;
db.attachment().updateAttachment(local);
Log.i("Updated size " + local);
}
// Download attachment
File file = EntityAttachment.getFile(context, local.id, local.name);
db.attachment().setProgress(local.id, null);