Added logging

This commit is contained in:
M66B 2023-08-13 15:25:18 +02:00
parent 4ce5315f08
commit 9c701e86f2
1 changed files with 4 additions and 0 deletions

View File

@ -2385,13 +2385,17 @@ class Core {
boolean fixed = prefs.getBoolean("fixed_poll." + account.id, false);
if (!fixed && account.created != null && account.created > 1691193600 * 1000L /* August 5, 2023 */)
try {
int count = 0;
EntityFolder inbox = db.folder().getFolderByType(account.id, EntityFolder.INBOX);
List<EntityFolder> children = db.folder().getChildFolders(inbox.id);
for (EntityFolder child : children)
if (!child.poll) {
count++;
db.folder().setFolderPoll(child.id, true);
EntityLog.log(context, "Fixed poll=" + child.name + ":" + child.type);
}
if (count > 0)
Log.e("Fixed poll count=" + count);
} catch (Throwable ex) {
Log.e(ex);
} finally {