Skip to content

Commit d223463

Browse files
committed
update: still call onComplete if items empty
1 parent 37ae27a commit d223463

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

core/src/main/java/com/fpf/smartscansdk/core/processors/BatchProcessor.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ abstract class BatchProcessor<Input, Output>(
2929
try {
3030
if (items.isEmpty()) {
3131
Log.w(TAG, "No items to process.")
32-
return@withContext Metrics.Success()
32+
val metrics = Metrics.Success()
33+
listener?.onComplete(application, metrics)
34+
return@withContext metrics
3335
}
3436

3537
val memoryUtils = MemoryUtils(application, options.memory)

0 commit comments

Comments
 (0)