From 1612838c4a3a8c3fb624e2d0a44305988feb3f57 Mon Sep 17 00:00:00 2001 From: SuperMonster003 Date: Mon, 10 Nov 2025 14:33:41 +0800 Subject: [PATCH] =?UTF-8?q?6.7.0=20-=20Alpha11=20-=20=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?notice=20=E6=96=B9=E6=B3=95=E5=8F=82=E6=95=B0=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=8F=8A=E7=B1=BB=E5=9E=8B=E9=99=90=E5=88=B6=E9=94=99=E8=AF=AF?= =?UTF-8?q?=20(issue=20#462)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changelog/lang_zh-Hans.json | 1 + .../autojs/autojs/runtime/api/augment/notice/Notice.kt | 6 +++--- version.properties | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.changelog/lang_zh-Hans.json b/.changelog/lang_zh-Hans.json index 994f48fb..e2313d51 100644 --- a/.changelog/lang_zh-Hans.json +++ b/.changelog/lang_zh-Hans.json @@ -26,6 +26,7 @@ "Scrapers 工具 (run-scrapers.mjs) 用于自动更新 Gradle 构建脚本结构化数据/README 通用数据/README 模板数据等" ], "fix": [ + "notice 方法参数数量及类型限制错误 _[`issue #462`](http://issues.autojs6.com/462)_", "isJavaClass/isJavaPackage 等全局方法无效的问题", "timers.keepAlive 方法 timeout 参数功能无效的问题", "floaty.window/rawWindow 方法无法接受字符串参数的问题", diff --git a/app/src/main/java/org/autojs/autojs/runtime/api/augment/notice/Notice.kt b/app/src/main/java/org/autojs/autojs/runtime/api/augment/notice/Notice.kt index ce3f0229..58c7dae6 100644 --- a/app/src/main/java/org/autojs/autojs/runtime/api/augment/notice/Notice.kt +++ b/app/src/main/java/org/autojs/autojs/runtime/api/augment/notice/Notice.kt @@ -62,7 +62,7 @@ class Notice(private val scriptRuntime: ScriptRuntime) : Augmentable(scriptRunti require(argList.size <= 2) { "Arguments length ${argList.size} shouldn't be greater than 2 for notice with builder" } - require(argList.size <= 1 && (arg1.isJsNullish() || arg1 is NativeObject)) { + require(arg1.isJsNullish() || arg1 is NativeObject) { "Argument options ${arg1.jsBrief()} must be a JavaScript Object for notice with builder" } @@ -106,7 +106,7 @@ class Notice(private val scriptRuntime: ScriptRuntime) : Augmentable(scriptRunti require(argList.size <= 2) { "Arguments length ${argList.size} shouldn't be greater than 2 for notice with content" } - require(argList.size <= 1 && (arg1.isJsNullish() || arg1 is NativeObject)) { + require(arg1.isJsNullish() || arg1 is NativeObject) { "Argument options ${arg1.jsBrief()} must be a JavaScript Object for notice with content" } @@ -126,7 +126,7 @@ class Notice(private val scriptRuntime: ScriptRuntime) : Augmentable(scriptRunti require(argList.size <= 3) { "Arguments length ${argList.size} shouldn't be greater than 3 for notice with title and content" } - require(argList.size <= 2 && (arg2.isJsNullish() || arg2 is NativeObject)) { + require(arg2.isJsNullish() || arg2 is NativeObject) { "Argument options ${arg2.jsBrief()} must be a JavaScript Object for notice with title and content" } diff --git a/version.properties b/version.properties index 6f0c351f..411efeb5 100644 --- a/version.properties +++ b/version.properties @@ -1,5 +1,5 @@ -#Mon Nov 03 13:14:49 CST 2025 -BUILD_TIME=1762146889031 +#Mon Nov 10 14:28:10 CST 2025 +BUILD_TIME=1762756090650 COMPILE_SDK_VERSION=36 IMAGE_QUANT_CMAKE_VERSION=3.22.1 IMAGE_QUANT_NDK_VERSION=26.1.10909125 @@ -27,6 +27,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13 RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3 TARGET_SDK_VERSION=36 TARGET_SDK_VERSION_INRT=29 -VERSION_BUILD=3468 -VERSION_NAME=6.7.0 Alpha10 +VERSION_BUILD=3483 +VERSION_NAME=6.7.0 Alpha11 VSCODE_EXT_REQUIRED_VERSION=1.0.8