From 2bd3efa149aa06f8d74ceaf1dbead0b7da65131c Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 24 Feb 2023 17:12:13 +0100 Subject: [PATCH] Debug info: hidden messages --- 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 fbdd71599b..7c72b13a9b 100644 --- a/app/src/main/java/eu/faircode/email/DaoMessage.java +++ b/app/src/main/java/eu/faircode/email/DaoMessage.java @@ -490,6 +490,11 @@ public interface DaoMessage { " AND NOT ui_seen") int countUnseen(long folder); + @Query("SELECT COUNT(*) FROM message" + + " WHERE folder = :folder" + + " AND ui_hide") + int countHidden(long folder); + @Query("SELECT COUNT(*)" + " FROM message" + " WHERE folder = :folder" + diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index d50a87920c..e84874e0dc 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -2434,6 +2434,7 @@ public class Log { for (TupleFolderEx folder : folders) if (folder.synchronize) { int unseen = db.message().countUnseen(folder.id); + int hidden = db.message().countHidden(folder.id); int notifying = db.message().countNotifying(folder.id); size += write(os, "- " + folder.name + " " + folder.type + (folder.inherited_type == null ? "" : "/" + folder.inherited_type) + @@ -2443,7 +2444,7 @@ public class Log { " days=" + folder.sync_days + "/" + folder.keep_days + " msgs=" + folder.content + "/" + folder.messages + "/" + folder.total + " ops=" + db.operation().getOperationCount(folder.id, null) + - " unseen=" + unseen + " notifying=" + notifying + + " unseen=" + unseen + " hidden=" + hidden + " notifying=" + notifying + " " + folder.state + (folder.last_sync == null ? "" : " " + dtf.format(folder.last_sync)) + "\r\n");