diff options
author | Nuckyz <61953774+Nuckyz@users.noreply.github.com> | 2023-04-05 00:06:04 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 05:06:04 +0200 |
commit | 12ffb9d64276dd36c7e1fd7c184e60448fbf748f (patch) | |
tree | 498f02ba8c31c3a5f00dd0ab56dfb4f0bb451553 /src/plugins/showHiddenChannels | |
parent | 99391a4f0eda95f06a5949496747b33a350e41f5 (diff) | |
download | Vencord-12ffb9d64276dd36c7e1fd7c184e60448fbf748f.tar.gz Vencord-12ffb9d64276dd36c7e1fd7c184e60448fbf748f.tar.bz2 Vencord-12ffb9d64276dd36c7e1fd7c184e60448fbf748f.zip |
Fake Nitro Transform Stickers option and other stuff (#683)
Co-authored-by: V <vendicated@riseup.net>
Diffstat (limited to 'src/plugins/showHiddenChannels')
-rw-r--r-- | src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx | 10 | ||||
-rw-r--r-- | src/plugins/showHiddenChannels/index.tsx | 11 |
2 files changed, 3 insertions, 18 deletions
diff --git a/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx b/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx index d2adbb0..9050037 100644 --- a/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx +++ b/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx @@ -77,13 +77,8 @@ enum ChannelFlags { REQUIRE_TAG = 1 << 4 } -let EmojiComponent: ComponentType<any>; let ChannelBeginHeader: ComponentType<any>; -export function setEmojiComponent(component: ComponentType<any>) { - EmojiComponent = component; -} - export function setChannelBeginHeaderComponent(component: ComponentType<any>) { ChannelBeginHeader = component; } @@ -245,11 +240,10 @@ function HiddenChannelLockScreen({ channel }: { channel: ExtendedChannel; }) { {defaultReactionEmoji != null && <div className="shc-lock-screen-default-emoji-container"> <Text variant="text-md/normal">Default reaction emoji:</Text> - <EmojiComponent node={{ - type: defaultReactionEmoji.emojiName ? "emoji" : "customEmoji", + {Parser.defaultRules[defaultReactionEmoji.emojiName ? "emoji" : "customEmoji"].react({ name: defaultReactionEmoji.emojiName ?? "", emojiId: defaultReactionEmoji.emojiId - }} /> + })} </div> } {channel.hasFlag(ChannelFlags.REQUIRE_TAG) && diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index e0c1245..d69085d 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -27,7 +27,7 @@ import { findByPropsLazy } from "@webpack"; import { ChannelStore, PermissionStore, Tooltip } from "@webpack/common"; import { Channel } from "discord-types/general"; -import HiddenChannelLockScreen, { setChannelBeginHeaderComponent, setEmojiComponent } from "./components/HiddenChannelLockScreen"; +import HiddenChannelLockScreen, { setChannelBeginHeaderComponent } from "./components/HiddenChannelLockScreen"; const ChannelListClasses = findByPropsLazy("channelName", "subtitle", "modeMuted", "iconContainer"); @@ -234,14 +234,6 @@ export default definePlugin({ replace: ".filter(ch=>!$self.isHiddenChannel(ch))" } }, - // Export the emoji component used on the lock screen - { - find: 'jumboable?"jumbo":"default"', - replacement: { - match: /jumboable\?"jumbo":"default",emojiId.+?}}\)},(?<=(\i)=function\(\i\){var \i=\i\.node.+?)/, - replace: (m, component) => `${m}shcEmojiComponentExport=($self.setEmojiComponent(${component}),void 0),` - } - }, { find: ".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE", replacement: [ @@ -403,7 +395,6 @@ export default definePlugin({ } ], - setEmojiComponent, setChannelBeginHeaderComponent, isHiddenChannel(channel: Channel & { channelId?: string; }, checkConnect = false) { |