From 48e464811053e593243389acf75c4f2ff0033e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E6=B1=A0?= <98259561+whitechi73@users.noreply.github.com> Date: Wed, 31 Jan 2024 12:22:01 +0800 Subject: [PATCH] `Shamrock`: fix guild refresh error --- .../shamrock/remote/action/handlers/GetGuildList.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/action/handlers/GetGuildList.kt b/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/action/handlers/GetGuildList.kt index 89807bc..110e795 100644 --- a/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/action/handlers/GetGuildList.kt +++ b/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/action/handlers/GetGuildList.kt @@ -20,11 +20,15 @@ internal object GetGuildList : IActionHandler() { } operator fun invoke(refresh: Boolean = true, echo: JsonElement = EmptyJsonString): String { + PlatformUtils.requireMinQQVersion(version = PlatformUtils.QQ_9_0_8_VER) + val kernelGProService = NTServiceFetcher.kernelService.wrapperSession.guildService if (refresh) { kernelGProService.refreshGuildList(true) + kernelGProService.guildListFromCache.forEach { + kernelGProService.refreshGuildInfo(it.guildId, true, 1) + } } - PlatformUtils.requireMinQQVersion(version = PlatformUtils.QQ_9_0_8_VER) val result = arrayListOf() kernelGProService.guildListFromCache.forEach { if (it.result != 0) return@forEach