+ if (($folder['lastfiltertype'] ?? false) && $messageCount > $totalCount) {
+ // This doesn't have to indicate an issue, since the timewindow of the filter wanders, so some messages that have been synchronized may no longer match the window.
+ } else {
+ println(" Issue Detected: The sync state seems to be inconsistent. The device should be fully synced, but the sync counts differ.");
+ println(" There are $messageCount ContentParts (should match number of messages on the device), but $totalCount messages in IMAP matching the filter.");