Debug info: blocked senders

This commit is contained in:
M66B 2023-09-02 11:39:14 +02:00
parent 144b9c46f8
commit d81be67338
2 changed files with 9 additions and 1 deletions

View File

@ -99,6 +99,11 @@ public interface DaoContact {
" OR type = " + EntityContact.TYPE_FROM + ")")
int countContacts();
@Query("SELECT COUNT(*) FROM contact" +
" WHERE account = :account" +
" AND type = " + EntityContact.TYPE_JUNK)
int countBlocked(long account);
@Insert
long insertContact(EntityContact contact);

View File

@ -2419,7 +2419,7 @@ public class Log {
" auto_optimize=" + auto_optimize + (auto_optimize ? " !!!" : "") +
" notifications=" + (filter == null ? null :
Helper.getInterruptionFilter(filter) +
(filter == NotificationManager.INTERRUPTION_FILTER_ALL ? "" : "!!!")) + "\r\n" +
(filter == NotificationManager.INTERRUPTION_FILTER_ALL ? "" : " !!!")) + "\r\n" +
"accounts=" + accounts.size() +
" folders=" + db.folder().countSync() + "/" + db.folder().countTotal() +
" messages=" + db.message().countTotal() +
@ -2499,6 +2499,8 @@ public class Log {
messages += folder.messages;
}
int blocked = db.contact().countBlocked(account.id);
boolean unmetered = false;
boolean ignore_schedule = false;
try {
@ -2522,6 +2524,7 @@ public class Log {
" poll=" + account.poll_interval +
" ondemand=" + account.ondemand + (account.ondemand ? " !!!" : "") +
" msgs=" + content + "/" + messages + " max=" + account.max_messages +
" blocked=" + blocked + (blocked == 0 ? "" : " !!!") +
" ops=" + db.operation().getOperationCount(account.id) +
" schedule=" + (!ignore_schedule) + (ignore_schedule ? " !!!" : "") +
" unmetered=" + unmetered + (unmetered ? " !!!" : "") +