Go back to did-finish-load

This commit is contained in:
Jiiks 2018-03-14 09:25:48 +02:00
parent bcc856bc6b
commit e73ac58ff3
2 changed files with 3 additions and 3 deletions

View File

@ -261,7 +261,7 @@ export class ReactAutoPatcher {
while (!window.webpackJsonp || !WebpackModules.getModuleByName('React')) await new Promise(resolve => setTimeout(resolve, 10));
return 1;
}
static async patchem() {
static patchem() {
this.patchMessage();
this.patchMessageGroup();
this.patchChannelMember();
@ -290,7 +290,7 @@ export class ReactAutoPatcher {
static async patchMessageGroup() {
ReactComponents.setName('MessageGroup', this.MessageGroup.filter);
this.MessageGroup.component = await ReactComponents.getComponent('MessageGroup');
this.MessageGroup.component = await ReactComponents.getComponent('MessageGroup', true, { selector: '.message-group' });
this.MessageGroup.component.on('render', ({ component, retVal, p }) => {
const authorid = component.props.messages[0].author.id;
retVal.props['data-author-id'] = authorid;

View File

@ -150,7 +150,7 @@ class BetterDiscord {
//this.windowUtils.webContents.on('did-finish-load', e => this.injectScripts(true));
this.windowUtils.events('did-get-response-details', () => this.ignite(this.windowUtils.window));
this.windowUtils.events('did-get-response-details', e => this.injectScripts(true));
this.windowUtils.events('did-finish-load', e => this.injectScripts(true));
this.windowUtils.events('did-navigate-in-page', (event, url, isMainFrame) => {
this.windowUtils.send('did-navigate-in-page', { event, url, isMainFrame });