await init and wait for APP_READY
This commit is contained in:
parent
8874ffffc5
commit
65d9c944d8
|
@ -198,6 +198,9 @@ const init = async () => {
|
|||
slash.init();
|
||||
autoExec = new AutoExecuteHandler(settings);
|
||||
|
||||
eventSource.on(event_types.APP_READY, ()=>finalizeInit());
|
||||
};
|
||||
const finalizeInit = async () => {
|
||||
log('executing startup');
|
||||
await autoExec.handleStartup();
|
||||
log('/executing startup');
|
||||
|
@ -211,7 +214,7 @@ const init = async () => {
|
|||
isReady = true;
|
||||
log('READY');
|
||||
};
|
||||
init();
|
||||
await init();
|
||||
|
||||
const onChatChanged = async (chatIdx) => {
|
||||
log('CHAT_CHANGED', chatIdx);
|
||||
|
|
Loading…
Reference in New Issue