From 84a11b44f57b160bb0187b65e7bbcae7e312260f Mon Sep 17 00:00:00 2001 From: Rico040 <93081680+Rico040@users.noreply.github.com> Date: Fri, 5 Jul 2024 21:40:55 +0900 Subject: [PATCH] HideGiftButton: include static asset id --- plugins/HideGiftButton/src/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/HideGiftButton/src/index.ts b/plugins/HideGiftButton/src/index.ts index 0b653cb..8c7f4ca 100644 --- a/plugins/HideGiftButton/src/index.ts +++ b/plugins/HideGiftButton/src/index.ts @@ -9,7 +9,13 @@ let unpatch: () => boolean; export default { onLoad() { - const blockList = ["ic_thread_normal_24px", "ic_gift"].map(n => getAssetIDByName(n)); + // 269 - static ic_gift asset id for >236 + const blockList = ["ic_thread_normal_24px", "ic_gift", 269].map(n => { + if (typeof n === "string") { + return getAssetIDByName(n); + } + return n; + }); unpatch = after("render", ChatInput.prototype, (_, ret) => { const input = findInReactTree(ret, t => "forceAnimateButtons" in t.props && t.props.actions); input.props.actions = input.props.actions.filter(a => !blockList.includes(a.source));