feat(AlignThreads)!: remove

This commit is contained in:
Cilly Leang 2025-09-02 17:53:38 +10:00
parent 05a76ff7ac
commit 269d3ad8a9
Signed by: cilly
GPG key ID: 6500251E087653C9
5 changed files with 0 additions and 65 deletions

View file

@ -1 +0,0 @@
/build

View file

@ -1,15 +0,0 @@
version = "1.0.1"
description = "Fixes the alignment of \"Create Thread\" button in message actions"
aliucord {
// Changelog of your plugin
changelog.set("""
# 1.0.1
* Also fix it in channels list actions
# 1.0.0
* Initial release >w<
""".trimIndent())
excludeFromUpdaterJson.set(false)
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="moe.lava.awoocord.alignthreads" />

View file

@ -1,46 +0,0 @@
package moe.lava.awoocord.alignthreads
import android.content.Context
import android.view.View
import android.widget.TextView
import androidx.core.content.ContextCompat
import com.aliucord.Utils
import com.aliucord.annotations.AliucordPlugin
import com.aliucord.entities.Plugin
import com.aliucord.patcher.*
import com.aliucord.utils.DimenUtils
import com.discord.utilities.drawable.DrawableCompat
import com.discord.widgets.channels.list.`WidgetChannelsListItemChannelActions$binding$2`
import com.discord.widgets.chat.list.actions.`WidgetChatListActions$binding$2`
import com.lytefast.flexinput.R
@AliucordPlugin()
@Suppress("unused")
class AlignThreads : Plugin() {
override fun start(ctx: Context) {
patcher.after<`WidgetChatListActions$binding$2`>("invoke", View::class.java)
{ (_, view: View) ->
val id = Utils.getResId("dialog_chat_actions_start_thread", "id")
val threadTextView = view.findViewById<TextView>(id)
val size = DimenUtils.dpToPx(24)
val icon = ContextCompat.getDrawable(threadTextView.context, R.e.ic_thread)!!
icon.setBounds(0, 0, size, size)
threadTextView.setCompoundDrawables(icon, null, null, null)
}
patcher.after<`WidgetChannelsListItemChannelActions$binding$2`>("invoke", View::class.java)
{ (_, view: View) ->
val id = Utils.getResId("text_action_thread_browser", "id")
val threadTextView = view.findViewById<TextView>(id)
val size = DimenUtils.dpToPx(24)
val res = DrawableCompat.getThemedDrawableRes(threadTextView.context, R.b.ic_thread)
val icon = ContextCompat.getDrawable(threadTextView.context, res)!!
icon.setBounds(0, 0, size, size)
threadTextView.setCompoundDrawables(icon, null, null, null)
}
}
override fun stop(ctx: Context) {
patcher.unpatchAll()
}
}

View file

@ -3,7 +3,6 @@ rootProject.name = "Awoocord"
val canaryPlugins = arrayOf("ComponentsV2", "SlashCommandsFix") val canaryPlugins = arrayOf("ComponentsV2", "SlashCommandsFix")
include( include(
"AlignThreads",
"Scout", "Scout",
*canaryPlugins, *canaryPlugins,
) )