feat(AlignThreads)!: remove
This commit is contained in:
parent
05a76ff7ac
commit
269d3ad8a9
5 changed files with 0 additions and 65 deletions
1
plugins/AlignThreads/.gitignore
vendored
1
plugins/AlignThreads/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
/build
|
||||
|
|
@ -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)
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="moe.lava.awoocord.alignthreads" />
|
||||
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,6 @@ rootProject.name = "Awoocord"
|
|||
val canaryPlugins = arrayOf("ComponentsV2", "SlashCommandsFix")
|
||||
|
||||
include(
|
||||
"AlignThreads",
|
||||
"Scout",
|
||||
*canaryPlugins,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue