Simplification

This commit is contained in:
M66B 2019-05-23 07:09:13 +02:00
parent a2365a7ba7
commit 6e5aba2535
2 changed files with 1 additions and 7 deletions

View File

@ -3068,8 +3068,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
EntityOperation.queue(context, message, EntityOperation.ADD);
// Delete from outbox
db.operation().deleteOperation(id, EntityOperation.SEND);
db.message().deleteMessage(id);
db.message().deleteMessage(id); // will delete operation too
db.setTransactionSuccessful();
} finally {

View File

@ -104,9 +104,4 @@ public interface DaoOperation {
@Query("DELETE FROM operation WHERE id = :id")
int deleteOperation(long id);
@Query("DELETE FROM operation" +
" WHERE message = :message" +
" AND name = :name")
int deleteOperation(long message, String name);
}