mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 18:37:04 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
46b03a686a
7 changed files with 111 additions and 85 deletions
|
@ -357,7 +357,7 @@ export default definePlugin({
|
|||
]
|
||||
},
|
||||
{
|
||||
find: ".SIZE_24,overflowCountVariant:",
|
||||
find: '="interactive-normal",overflowCountClassName:',
|
||||
replacement: [
|
||||
{
|
||||
// Create a variable for the channel prop
|
||||
|
@ -366,20 +366,21 @@ export default definePlugin({
|
|||
},
|
||||
{
|
||||
// Make Discord always render the plus button if the component is used inside the HiddenChannelLockScreen
|
||||
match: /\i>0(?=&&.{0,60}Math.min)/,
|
||||
match: /\i>0(?=&&.{0,30}Math.min)/,
|
||||
replace: m => `($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)?true:${m})`
|
||||
},
|
||||
{
|
||||
// Prevent Discord from overwriting the last children with the plus button
|
||||
// if the overflow amount is <= 0 and the component is used inside the HiddenChannelLockScreen
|
||||
match: /(?<=\i\.length-)1(?=\]=.{0,60}renderPopout)(?<=(\i)=\i\.length-\i.*)/,
|
||||
match: /(?<=\i\.length-)1(?=\]=.{0,60}renderPopout)(?<=(\i)=\i\.length-\i.+?)/,
|
||||
replace: (_, amount) => `($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&${amount}<=0?0:1)`
|
||||
},
|
||||
{
|
||||
// Show only the plus text without overflowed children amount
|
||||
// if the overflow amount is <= 0 and the component is used inside the HiddenChannelLockScreen
|
||||
match: /(?<="\+"\.concat\()(\i)/,
|
||||
replace: (m, amount) => `$self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&${amount}<=0?"":${m}`
|
||||
match: /(?<="\+"\.concat\()\i/,
|
||||
replace: overflowTextAmount => "" +
|
||||
`$self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&(${overflowTextAmount}-1)<=0?"":${overflowTextAmount}`
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue