diff options
author | Nuckyz <61953774+Nuckyz@users.noreply.github.com> | 2023-04-15 00:40:42 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-15 03:40:42 +0000 |
commit | 1f7ec93a246b4f2b2d756141ddb71169e592453a (patch) | |
tree | bb9f6346e9f755c28cd080b92a3056a3e0cbc5a9 /src/plugins/showHiddenChannels/index.tsx | |
parent | 336c7bdd5e7324b35596200a50ca1d3da3d7ce83 (diff) | |
download | Vencord-1f7ec93a246b4f2b2d756141ddb71169e592453a.tar.gz Vencord-1f7ec93a246b4f2b2d756141ddb71169e592453a.tar.bz2 Vencord-1f7ec93a246b4f2b2d756141ddb71169e592453a.zip |
SHC: Small improvements (#907)
Diffstat (limited to 'src/plugins/showHiddenChannels/index.tsx')
-rw-r--r-- | src/plugins/showHiddenChannels/index.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 5cdc05b..272ff7a 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -310,6 +310,11 @@ export default definePlugin({ replace: (m, props) => `${m}!${props}.inCall&&$self.isHiddenChannel(${props}.channel,true)){}else if(` }, { + // Remove invite users button for the HiddenChannelLockScreen + match: /"popup".{0,100}?if\((?<=(\i)\.channel.+?)/, + replace: (m, props) => `${m}(${props}.inCall||!$self.isHiddenChannel(${props}.channel,true))&&` + }, + { // Render our HiddenChannelLockScreen component instead of the main voice channel component match: /this\.renderVoiceChannelEffects.+?children:(?<=renderContent=function.+?)/, replace: "$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?$self.HiddenChannelLockScreen(this.props.channel):" @@ -326,8 +331,8 @@ export default definePlugin({ }, { // Disable bad CSS class which mess up hidden voice channels styling - match: /callContainer,(?<=(\i)=\i\.channel.+?\(\)\.callContainer,)/, - replace: (m, channel) => `${m}$self.isHiddenChannel(${channel},true)?"":` + match: /callContainer,(?<=\(\)\.callContainer,)/, + replace: '$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":' } ] }, |