From fa787a17e17bf54049d7a3e1b5ccc44562d87e83 Mon Sep 17 00:00:00 2001 From: lisonge Date: Mon, 2 Sep 2024 21:24:05 +0800 Subject: [PATCH] feat: add random variable (#725) --- app/src/main/kotlin/li/songe/gkd/data/RawSubscription.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/kotlin/li/songe/gkd/data/RawSubscription.kt b/app/src/main/kotlin/li/songe/gkd/data/RawSubscription.kt index 2137289fb..8608df208 100644 --- a/app/src/main/kotlin/li/songe/gkd/data/RawSubscription.kt +++ b/app/src/main/kotlin/li/songe/gkd/data/RawSubscription.kt @@ -444,6 +444,7 @@ data class RawSubscription( exp.setVariable("bottom", rect.bottom.toDouble()) exp.setVariable("width", rect.width().toDouble()) exp.setVariable("height", rect.height().toDouble()) + exp.setVariable("random", Math.random()) } private fun getExpression(value: String?): Expression? {