fix performance issues with enhancements builtin

pull/42/head
dperolio 3 years ago
parent 6dd485eb5e
commit 4d614ad4f1
No known key found for this signature in database
GPG Key ID: 3E9BBAA710D3DDCE

@ -6,16 +6,16 @@ export default class Enhancements extends Builtin {
async start () {
this.injectStyles('styles/main.scss');
this.callbacks = [];
for (const mod of Object.keys(modules)) {
Object.keys(modules).forEach(async mod => {
try {
const callback = await modules[mod].default(this);
const callback = await modules[mod](this);
if (typeof callback === 'function') {
this.callbacks.push(callback);
}
} catch (err) {
return this.error(modules[mod].labels.concat(mod), err);
}
}
});
}
stop () {

@ -1,5 +1,5 @@
// ---
export * as ServerInviteIcons from './components/contextmenu/ServerInviteIcons';
export * as BotTags from './chat/BotTags';
export { default as ServerInviteIcons } from './components/contextmenu/ServerInviteIcons';
export { default as BotTags } from './chat/BotTags';
// ---
export * as Dispatcher from './global/Dispatcher';
export { default as Dispatcher } from './global/Dispatcher';

@ -85,3 +85,10 @@
}
}
}
// Remove the border-radius when there are multiple notices
.notice-3bPHh- {
& + & {
border-radius: 0;
}
}

Loading…
Cancel
Save