diff options
author | Snek <107999380+sneksnake@users.noreply.github.com> | 2022-10-30 19:17:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-30 19:17:46 +0100 |
commit | b905743077f5ffdd09c8ff3464ac19f770ae875f (patch) | |
tree | cf9d6b3fea08cdc25626faf0ff1e5260db007f69 | |
parent | a43a41f61f4d4648d5464476811d82be3dcdf439 (diff) | |
download | Vencord-b905743077f5ffdd09c8ff3464ac19f770ae875f.tar.gz Vencord-b905743077f5ffdd09c8ff3464ac19f770ae875f.tar.bz2 Vencord-b905743077f5ffdd09c8ff3464ac19f770ae875f.zip |
removed channel type (#170)
Co-authored-by: Ven <vendicated@riseup.net>
-rw-r--r-- | src/plugins/showHiddenChannels.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/showHiddenChannels.tsx b/src/plugins/showHiddenChannels.tsx index b9f8270..7f2c4b8 100644 --- a/src/plugins/showHiddenChannels.tsx +++ b/src/plugins/showHiddenChannels.tsx @@ -16,6 +16,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ + import { Flex } from "../components/Flex"; import { Devs } from "../utils/constants"; import { ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "../utils/modal"; @@ -58,7 +59,7 @@ export default definePlugin({ find: ".CannotShow", replacement: { match: /renderLevel:(\w+)\.CannotShow/g, - replace: "renderLevel:Vencord.Plugins.plugins.ShowHiddenChannels.shouldShow(this.record, this.category, this.isMuted) ? $1.Show : $1.CannotShow" + replace: "renderLevel:Vencord.Plugins.plugins.ShowHiddenChannels.shouldShow(this.record, this.category, this.isMuted)?$1.Show:$1.CannotShow" } }, { @@ -74,7 +75,7 @@ export default definePlugin({ find: ".handleThreadsPopoutClose();", replacement: { match: /((\w)\.handleThreadsPopoutClose\(\);)/g, - replace: "if(Vencord.Plugins.plugins.ShowHiddenChannels.channelSelected($2?.props?.channel))return;$1" + replace: "if(arguments[0].button===0&&Vencord.Plugins.plugins.ShowHiddenChannels.channelSelected($2?.props?.channel))return;$1" } }, { @@ -127,7 +128,6 @@ export default definePlugin({ // check for type again, otherwise it would show it for hidden stage channels if (channel.type === 0 && isHidden) { const lastMessageDate = channel.lastActiveTimestamp ? new Date(channel.lastActiveTimestamp).toLocaleString() : null; - openModal(modalProps => ( <ModalRoot size={ModalSize.SMALL} {...modalProps}> <ModalHeader> @@ -166,7 +166,7 @@ export default definePlugin({ size={Button.Sizes.SMALL} color={Button.Colors.PRIMARY} > - Continue + Close </Button> </Flex> </ModalFooter> |