From 8916d64b96a747d3b84af908ca83b72b57689053 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 31 Mar 2021 20:48:19 +0200 Subject: [PATCH] Optimized send pending query --- app/src/main/java/eu/faircode/email/DaoMessage.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/DaoMessage.java b/app/src/main/java/eu/faircode/email/DaoMessage.java index 8619a50770..ed45b6beff 100644 --- a/app/src/main/java/eu/faircode/email/DaoMessage.java +++ b/app/src/main/java/eu/faircode/email/DaoMessage.java @@ -247,9 +247,8 @@ public interface DaoMessage { @Query("SELECT COUNT(*) FROM message" + " JOIN folder_view AS folder ON folder.id = message.folder" + - " LEFT JOIN operation ON operation.message = message.id" + " WHERE " + is_outbox + - " AND operation.id IS NULL") + " AND NOT ui_snoozed IS NULL") LiveData liveOutboxPending(); @Query("SELECT account.name AS accountName" +