@Override public void messageFinished(T message, int number, int ofTotal) { try { if (message.isSet(Flag.DELETED) || message.olderThan(earliestDate)) { if (message.isSet(Flag.DELETED)) { Timber.v("Newly downloaded message %s:%s:%s was marked deleted on server, " + "skipping", accountName, folder, message.getUid()); } else { Timber.d("Newly downloaded message %s is older than %s, skipping", message.getUid(), earliestDate); } progress.incrementAndGet(); //TODO: This might be the source of poll count errors in the UI. Is todo always the same as ofTotal listener.syncProgress(folder, progress.get(), todo); return; } if (syncConfig.getMaximumAutoDownloadMessageSize() > 0 && message.getSize() > syncConfig.getMaximumAutoDownloadMessageSize()) { largeMessages.add(message); } else { smallMessages.add(message); } } catch (Exception e) { Timber.e(e, "Error while storing downloaded message."); } }
@Override public void messageFinished(T message, int number, int ofTotal) { try { if (message.isSet(Flag.DELETED) || message.olderThan(earliestDate)) { if (message.isSet(Flag.DELETED)) { Timber.v("Newly downloaded message %s:%s:%s was marked deleted on server, " + "skipping", accountName, folder, message.getUid()); } else { Timber.d("Newly downloaded message %s is older than %s, skipping", message.getUid(), earliestDate); } progress.incrementAndGet(); //TODO: This might be the source of poll count errors in the UI. Is todo always the same as ofTotal listener.syncProgress(folder, progress.get(), todo); return; } if (syncConfig.getMaximumAutoDownloadMessageSize() > 0 && message.getSize() > syncConfig.getMaximumAutoDownloadMessageSize()) { largeMessages.add(message); } else { smallMessages.add(message); } } catch (Exception e) { Timber.e(e, "Error while storing downloaded message."); } }
@Override public void messageFinished(T message, int number, int ofTotal) { try { if (message.isSet(Flag.DELETED) || message.olderThan(earliestDate)) { if (message.isSet(Flag.DELETED)) { Timber.v("Newly downloaded message %s:%s:%s was marked deleted on server, " + "skipping", accountName, folder, message.getUid()); } else { Timber.d("Newly downloaded message %s is older than %s, skipping", message.getUid(), earliestDate); } progress.incrementAndGet(); //TODO: This might be the source of poll count errors in the UI. Is todo always the same as ofTotal listener.syncProgress(folder, progress.get(), todo); return; } if (syncConfig.getMaximumAutoDownloadMessageSize() > 0 && message.getSize() > syncConfig.getMaximumAutoDownloadMessageSize()) { largeMessages.add(message); } else { smallMessages.add(message); } } catch (Exception e) { Timber.e(e, "Error while storing downloaded message."); } }
if (syncConfig.getMaximumAutoDownloadMessageSize() == 0 || message.getSize() < syncConfig.getMaximumAutoDownloadMessageSize()) { completeMessage = true;
if (syncConfig.getMaximumAutoDownloadMessageSize() == 0 || message.getSize() < syncConfig.getMaximumAutoDownloadMessageSize()) { completeMessage = true;
private void configureSyncConfigWithSyncRemoteDeletionsAndEarliestPollDate(Date earliestPollDate) { syncConfig = syncConfig.copy( syncConfig.getExpungePolicy(), earliestPollDate, true, syncConfig.getMaximumAutoDownloadMessageSize(), syncConfig.getDefaultVisibleLimit(), syncConfig.getSyncFlags()); } }
private void configureSyncConfigWithSyncRemoteDeletions(boolean syncRemoteDeletions) { syncConfig = syncConfig.copy( syncConfig.getExpungePolicy(), syncConfig.getEarliestPollDate(), syncRemoteDeletions, syncConfig.getMaximumAutoDownloadMessageSize(), syncConfig.getDefaultVisibleLimit(), syncConfig.getSyncFlags()); }
private void configureSyncConfigWithExpungePolicy(ExpungePolicy expungePolicy) { syncConfig = syncConfig.copy( expungePolicy, syncConfig.getEarliestPollDate(), syncConfig.getSyncRemoteDeletions(), syncConfig.getMaximumAutoDownloadMessageSize(), syncConfig.getDefaultVisibleLimit(), syncConfig.getSyncFlags()); }