pull/178/head
M66B 5 years ago
parent 86a7f49f8d
commit 86e589a904

@ -334,6 +334,11 @@ public interface DaoMessage {
" AND (id = :id OR msgid = :msgid)")
List<EntityMessage> getMessagesBySimilarity(long account, long id, String msgid);
@Query("SELECT * FROM message" +
" WHERE account = :account" +
" AND hash = :hash")
List<EntityMessage> getMessagesByHash(long account, String hash);
@Query("SELECT COUNT(*) FROM message" +
" WHERE folder = :folder" +
" AND msgid = :msgid")

@ -299,10 +299,18 @@ public class EntityOperation {
return;
} else if (DELETE.equals(name))
} else if (DELETE.equals(name)) {
db.message().setMessageUiHide(message.id, true);
else if (ATTACHMENT.equals(name))
/*
if (message.hash != null) {
List<EntityMessage> sames = db.message().getMessagesByHash(message.account, message.hash);
for (EntityMessage same : sames) {
db.message().setMessageUiHide(same.id, true);
queue(context, same.account, same.folder, same.id, name, jargs);
}
}
*/
} else if (ATTACHMENT.equals(name))
db.attachment().setProgress(jargs.getLong(0), 0);
queue(context, message.account, message.folder, message.id, name, jargs);

Loading…
Cancel
Save