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