disable invalid automation rule

This commit is contained in:
Milos Kozak 2021-11-04 12:20:30 +01:00
parent 756957ed8c
commit 0a798d1ea4

View file

@ -47,6 +47,7 @@ class AutomationEvent(private val injector: HasAndroidInjector) {
fun areActionsValid(): Boolean { fun areActionsValid(): Boolean {
var result = true var result = true
for (action in actions) result = result && action.isValid() for (action in actions) result = result && action.isValid()
if (!result) isEnabled = false
return result return result
} }