Fix ChannelMember returning wrong component
This commit is contained in:
parent
5ce78f4b32
commit
85d5de9791
|
@ -338,7 +338,7 @@ export class ReactAutoPatcher {
|
|||
static async patchChannelMember() {
|
||||
const selector = '.' + WebpackModules.getModuleByProps(['member', 'memberInner', 'activity']).member;
|
||||
|
||||
this.ChannelMember = await ReactComponents.getComponent('ChannelMember', { selector });
|
||||
this.ChannelMember = await ReactComponents.getComponent('ChannelMember', { selector }, m => m.prototype.renderActivity);
|
||||
this.unpatchChannelMemberRender = MonkeyPatch('BD:ReactComponents', this.ChannelMember.component.prototype).after('render', (component, args, retVal) => {
|
||||
if (!retVal.props || !retVal.props.children) return;
|
||||
const user = Helpers.findProp(component, 'user');
|
||||
|
|
|
@ -92,7 +92,9 @@ export default class extends Module {
|
|||
|
||||
// Rerender all channel members
|
||||
if (this.PatchedNameTag) {
|
||||
for (const channelMember of document.querySelectorAll('.member-2FrNV0')) {
|
||||
const selector = '.' + WebpackModules.getModuleByProps(['member', 'memberInner', 'activity']).member;
|
||||
|
||||
for (const channelMember of document.querySelectorAll(selector)) {
|
||||
Reflection(channelMember).forceUpdate();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue