From 224b44bc95ecd2fa0def2619ae0be396d11b305a Mon Sep 17 00:00:00 2001 From: Colter23 <13864833022@163.com> Date: Mon, 20 Jun 2022 00:03:54 +0800 Subject: [PATCH] update --- build.gradle.kts | 11 ++++++++++- .../mirai/plugin/bilibili/tasker/BiliDataTasker.kt | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index d993321..1ce2507 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,6 +19,15 @@ repositories { dependencies{ implementation("com.google.zxing:javase:3.4.1") - implementation("org.jetbrains.skiko:skiko-awt-runtime-windows-x64:0.7.18") + + val skikoVersion = "0.7.20" + //api("org.jetbrains.skiko:skiko-awt:0.7.20") + //临时 + implementation("org.jetbrains.skiko:skiko-awt-runtime-linux-x64:$skikoVersion") + implementation("org.jetbrains.skiko:skiko-awt-runtime-windows-x64:$skikoVersion") + implementation("org.jetbrains.skiko:skiko-awt-runtime-linux-arm64:$skikoVersion") + implementation("org.jetbrains.skiko:skiko-awt-runtime-macos-x64:$skikoVersion") + implementation("org.jetbrains.skiko:skiko-awt-runtime-macos-arm64:$skikoVersion") + testImplementation(kotlin("test", "1.6.21")) } diff --git a/src/main/kotlin/top/colter/mirai/plugin/bilibili/tasker/BiliDataTasker.kt b/src/main/kotlin/top/colter/mirai/plugin/bilibili/tasker/BiliDataTasker.kt index f034d57..5dba179 100644 --- a/src/main/kotlin/top/colter/mirai/plugin/bilibili/tasker/BiliDataTasker.kt +++ b/src/main/kotlin/top/colter/mirai/plugin/bilibili/tasker/BiliDataTasker.kt @@ -41,7 +41,7 @@ object BiliDataTasker { private val filter by BiliData::filter suspend fun listenAll(subject: String) = mutex.withLock { - dynamic.forEach { (uid, sub) -> + dynamic.forEach { (_, sub) -> if (subject in sub.contacts) { sub.contacts.remove(subject) } @@ -261,7 +261,7 @@ object BiliDataTasker { suspend fun listUser() = mutex.withLock { buildString { val user = mutableSetOf() - dynamic.forEach { (uid, sub) -> + dynamic.forEach { (_, sub) -> user.addAll(sub.contacts) } val group = StringBuilder()