Added unseen/notifying to debug info

pull/194/merge
M66B 3 years ago
parent ba1d4cf230
commit bcfa1c37a2

@ -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…
Cancel
Save