mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 07:01:05 +00:00
Added unseen/notifying to debug info
This commit is contained in:
parent
ba1d4cf230
commit
bcfa1c37a2
2 changed files with 18 additions and 1 deletions
|
@ -461,6 +461,19 @@ public interface DaoMessage {
|
|||
@Query("SELECT COUNT(*) FROM message")
|
||||
int countTotal();
|
||||
|
||||
@Query("SELECT COUNT(*) FROM message" +
|
||||
" WHERE folder = :folder" +
|
||||
" AND NOT ui_seen")
|
||||
int countUnseen(long folder);
|
||||
|
||||
@Query("SELECT COUNT(*)" +
|
||||
" FROM message" +
|
||||
" WHERE folder = :folder" +
|
||||
" AND notifying <> 0" +
|
||||
" AND notifying <> " + EntityMessage.NOTIFYING_IGNORE +
|
||||
" AND NOT (message.ui_seen OR message.ui_ignored OR message.ui_hide)")
|
||||
int countNotifying(long folder);
|
||||
|
||||
@Query("SELECT message.*" +
|
||||
", account.pop AS accountProtocol, account.name AS accountName, account.category AS accountCategory, identity.color AS accountColor" +
|
||||
", account.notify AS accountNotify, account.leave_deleted AS accountLeaveDeleted, account.auto_seen AS accountAutoSeen" +
|
||||
|
|
|
@ -2135,16 +2135,20 @@ public class Log {
|
|||
if (folders.size() > 0)
|
||||
Collections.sort(folders, folders.get(0).getComparator(context));
|
||||
for (TupleFolderEx folder : folders)
|
||||
if (folder.synchronize)
|
||||
if (folder.synchronize) {
|
||||
int unseen = db.message().countUnseen(folder.id);
|
||||
int notifying = db.message().countNotifying(folder.id);
|
||||
size += write(os, "- " + folder.name + " " + folder.type +
|
||||
(folder.unified ? " unified" : "") +
|
||||
(folder.notify ? " notify" : "") +
|
||||
" poll=" + folder.poll + "/" + folder.poll_factor +
|
||||
" days=" + folder.sync_days + "/" + folder.keep_days +
|
||||
" msgs=" + folder.content + "/" + folder.messages + "/" + folder.total +
|
||||
" unseen=" + unseen + " notifying=" + notifying +
|
||||
" " + folder.state +
|
||||
(folder.last_sync == null ? "" : " " + dtf.format(folder.last_sync)) +
|
||||
"\r\n");
|
||||
}
|
||||
|
||||
size += write(os, "\r\n");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue