Adjusting check
This commit is contained in:
parent
374753595c
commit
cd821b7e08
@ -53,7 +53,7 @@ class ConvertWorkTaskListener: WorkTaskListener() {
|
||||
}
|
||||
|
||||
val startedWithOperations = events.findFirstEventOf<MediaProcessStartEvent>()?.data?.operations ?: return false
|
||||
if (startedWithOperations.isOnly(OperationEvents.CONVERT)) {
|
||||
if (startedWithOperations.isOnly(OperationEvents.CONVERT) && shouldIHandleAndProduce) {
|
||||
return true
|
||||
}
|
||||
return shouldIHandleAndProduce
|
||||
|
||||
@ -23,5 +23,5 @@ enum class OperationEvents {
|
||||
}
|
||||
|
||||
fun List<OperationEvents>.isOnly(expected: OperationEvents): Boolean {
|
||||
return this.size == 1 && this.firstOrNull { it == expected } != null
|
||||
return this.size == 1 && this.all { it == expected }
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user