aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/showHiddenChannels.tsx
diff options
context:
space:
mode:
authorSnek <107999380+sneksnake@users.noreply.github.com>2022-10-30 19:17:46 +0100
committerGitHub <noreply@github.com>2022-10-30 19:17:46 +0100
commitb905743077f5ffdd09c8ff3464ac19f770ae875f (patch)
treecf9d6b3fea08cdc25626faf0ff1e5260db007f69 /src/plugins/showHiddenChannels.tsx
parenta43a41f61f4d4648d5464476811d82be3dcdf439 (diff)
downloadVencord-b905743077f5ffdd09c8ff3464ac19f770ae875f.tar.gz
Vencord-b905743077f5ffdd09c8ff3464ac19f770ae875f.tar.bz2
Vencord-b905743077f5ffdd09c8ff3464ac19f770ae875f.zip
removed channel type (#170)
Co-authored-by: Ven <vendicated@riseup.net>
Diffstat (limited to 'src/plugins/showHiddenChannels.tsx')
-rw-r--r--src/plugins/showHiddenChannels.tsx8
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>