fix whoreacted (#1051)
* fix whoreacted * make it a bit smaller * make it better lol
This commit is contained in:
parent
c5b8d2ee65
commit
0709012d78
1 changed files with 4 additions and 2 deletions
|
|
@ -96,8 +96,8 @@ export default definePlugin({
|
|||
{
|
||||
find: ",reactionRef:",
|
||||
replacement: {
|
||||
match: /(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,
|
||||
replace: "$&$1?null:$self.renderUsers(this.props),"
|
||||
match: /\(0,\i\.jsx\)\(\i\.\i,\{className:\i\.reactionCount,.{0,60}\}\),/,
|
||||
replace: "$&$self.renderUsers(arguments[0]),"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -122,6 +122,7 @@ export default definePlugin({
|
|||
},
|
||||
|
||||
renderUsers(props: RootObject) {
|
||||
if (!props?.message || props.hideCount) return null;
|
||||
return props.message.reactions.length > 10 ? null : (
|
||||
<ErrorBoundary noop>
|
||||
<this.UsersComponent {...props} />
|
||||
|
|
@ -197,6 +198,7 @@ interface RootObject {
|
|||
burst_me: boolean;
|
||||
me: boolean;
|
||||
type: number;
|
||||
hideCount: boolean;
|
||||
hideEmoji: boolean;
|
||||
remainingBurstCurrency: number;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue