mirror of
https://github.com/Equicord/Equicord.git
synced 2025-03-04 16:30:15 -05:00
Fix WhosWatching Error
This commit is contained in:
parent
00fefab3d4
commit
f3d90a8842
2 changed files with 4 additions and 4 deletions
|
@ -62,8 +62,8 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "fetchRelationships(){",
|
find: "fetchRelationships(){",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /\.then\((\i)=>(\i\.\i)\.dispatch\({type:"LOAD_RELATIONSHIPS_SUCCESS",relationships:(\i\.body)}\)/,
|
match: /(\.then\(\i)=>(\i\.\i\.dispatch\({type:"LOAD_RELATIONSHIPS_SUCCESS"),relationships:(\i\.body)}\)/,
|
||||||
replace: ".then($1=>{$2.dispatch({type:\"LOAD_RELATIONSHIPS_SUCCESS\",relationships:$3}); $self.getContacts($3)}"
|
replace: "$1=>{$2,relationships:$3}); $self.getContacts($3)}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -165,7 +165,7 @@ export default definePlugin({
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
component: function ({ OriginalComponent }) {
|
component: function ({ OriginalComponent }) {
|
||||||
return (props: any) => {
|
return ErrorBoundary.wrap((props: any) => {
|
||||||
const stream = useStateFromStores([ApplicationStreamingStore], () => ApplicationStreamingStore.getCurrentUserActiveStream());
|
const stream = useStateFromStores([ApplicationStreamingStore], () => ApplicationStreamingStore.getCurrentUserActiveStream());
|
||||||
const viewers = ApplicationStreamingStore.getViewerIds(encodeStreamKey(stream));
|
const viewers = ApplicationStreamingStore.getViewerIds(encodeStreamKey(stream));
|
||||||
return <Tooltip text={<Watching userIds={viewers} guildId={stream.guildId} />}>
|
return <Tooltip text={<Watching userIds={viewers} guildId={stream.guildId} />}>
|
||||||
|
@ -175,6 +175,6 @@ export default definePlugin({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Tooltip>;
|
</Tooltip>;
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue