From 03a3d69447b302fd2779a3ab89a00c09629e5d34 Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Tue, 15 Jul 2025 19:02:05 +1000 Subject: [PATCH] fix: rename ComponentsV2-Beta -> ComponentsV2Beta --- .../kotlin/com/aliucord/coreplugins/ComponentsV2.kt | 10 ++++++++++ settings.gradle.kts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/canary/ComponentsV2/src/main/kotlin/com/aliucord/coreplugins/ComponentsV2.kt b/canary/ComponentsV2/src/main/kotlin/com/aliucord/coreplugins/ComponentsV2.kt index 467c460..82684e0 100644 --- a/canary/ComponentsV2/src/main/kotlin/com/aliucord/coreplugins/ComponentsV2.kt +++ b/canary/ComponentsV2/src/main/kotlin/com/aliucord/coreplugins/ComponentsV2.kt @@ -4,6 +4,7 @@ import android.content.Context import android.view.ViewGroup import android.widget.LinearLayout import androidx.constraintlayout.widget.ConstraintLayout +import com.aliucord.Constants import com.aliucord.Utils import com.aliucord.annotations.AliucordPlugin import com.aliucord.coreplugins.componentsv2.ComponentV2Type @@ -30,6 +31,7 @@ import com.discord.widgets.chat.list.entries.BotUiComponentEntry import com.google.gson.stream.JsonReader import com.lytefast.flexinput.R import de.robv.android.xposed.XposedBridge +import java.io.File @AliucordPlugin(requiresRestart = true) @Suppress("unused") @@ -64,6 +66,14 @@ class ComponentsV2 : Plugin() { } override fun start(context: Context) { + val oldFile = File("${Constants.PLUGINS_PATH}/ComponentsV2-Beta.zip") + if (oldFile.exists()) { + logger.info("old plugin found, deleting and prompting restart") + oldFile.delete() + Utils.promptRestart() + return + } + XposedBridge.makeClassInheritable(BotUiComponentEntry::class.java) ComponentV2Type.make() patchGson() diff --git a/settings.gradle.kts b/settings.gradle.kts index a8ead21..e22cef1 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -12,6 +12,6 @@ rootProject.children.forEach { val isCanary = it.name in canaryPlugins val dir = if (isCanary) "canary" else "plugins" val name = it.name - if (isCanary) it.name += "-Beta" + if (isCanary) it.name += "Beta" it.projectDir = file("${dir}/${name}") }