Fixed conditions being inaccurately represented

This commit is contained in:
Viktor De Pasquale 2019-05-23 19:17:41 +02:00
parent 99d7d8ddbc
commit d86fb033ea

View File

@ -14,7 +14,9 @@ interface MagiskQueryBuilder {
Builder::class.java.newInstance()
.apply(builder)
.toString()
.let { MagiskQuery(it) }
.let {
MagiskQuery(it)
}
}
}
@ -131,11 +133,11 @@ class Condition {
}
fun and(builder: Condition.() -> Unit) {
condition += " " + Condition().apply(builder).condition
condition = "($condition AND ${Condition().apply(builder).condition})"
}
fun or(builder: Condition.() -> Unit) {
condition += " " + Condition().apply(builder).condition
condition = "($condition OR ${Condition().apply(builder).condition})"
}
override fun toString(): String {