From 61e9407f629c46773a2b82951789a55f30a023f5 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 20 Mar 2022 07:44:12 +0100 Subject: [PATCH] Debug info: outbox count --- app/src/main/java/eu/faircode/email/DaoMessage.java | 5 +++++ app/src/main/java/eu/faircode/email/Log.java | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/DaoMessage.java b/app/src/main/java/eu/faircode/email/DaoMessage.java index a137c3620d..b71a122fda 100644 --- a/app/src/main/java/eu/faircode/email/DaoMessage.java +++ b/app/src/main/java/eu/faircode/email/DaoMessage.java @@ -462,6 +462,11 @@ public interface DaoMessage { " AND sender = :sender") int countSender(long folder, String sender); + @Query("SELECT COUNT(*) FROM message" + + " JOIN folder ON folder.id = message.folder" + + " WHERE folder.account IS NULL") + int countOutbox(); + @Query("SELECT COUNT(*) FROM message") int countTotal(); diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index 8c06c2d2e1..fb4cc69c12 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -2075,7 +2075,8 @@ public class Log { " folders=" + db.folder().countTotal() + " messages=" + db.message().countTotal() + " rules=" + db.rule().countTotal() + - " operations=" + db.operation().getOperationCount() + + " ops=" + db.operation().getOperationCount() + + " outbox=" + db.message().countOutbox() + "\r\n\r\n"); if (schedule) {