Skip to content

Commit

Permalink
Honor the isLast setting
Browse files Browse the repository at this point in the history
  • Loading branch information
tyronen committed Jul 20, 2015
1 parent 863275b commit d069613
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public CachedPostprocessorConsumer(final Consumer<CloseableReference<CloseableIm
protected void onNewResultImpl(CloseableReference<CloseableImage> newResult, boolean isLast) {
// Given a null result, we just pass it on.
if (newResult == null) {
getConsumer().onNewResult(null, true);
getConsumer().onNewResult(null, isLast);
return;
}

Expand All @@ -145,7 +145,7 @@ public boolean apply(CacheKey cacheKey) {
try {
getConsumer().onProgressUpdate(1f);
getConsumer().onNewResult(
(newCachedResult != null) ? newCachedResult : newResult, true);
(newCachedResult != null) ? newCachedResult : newResult, isLast);
} finally {
CloseableReference.closeSafely(newCachedResult);
}
Expand Down

0 comments on commit d069613

Please sign in to comment.