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();
|
slash.init();
|
||||||
autoExec = new AutoExecuteHandler(settings);
|
autoExec = new AutoExecuteHandler(settings);
|
||||||
|
|
||||||
|
eventSource.on(event_types.APP_READY, ()=>finalizeInit());
|
||||||
|
};
|
||||||
|
const finalizeInit = async () => {
|
||||||
log('executing startup');
|
log('executing startup');
|
||||||
await autoExec.handleStartup();
|
await autoExec.handleStartup();
|
||||||
log('/executing startup');
|
log('/executing startup');
|
||||||
|
@ -211,7 +214,7 @@ const init = async () => {
|
||||||
isReady = true;
|
isReady = true;
|
||||||
log('READY');
|
log('READY');
|
||||||
};
|
};
|
||||||
init();
|
await init();
|
||||||
|
|
||||||
const onChatChanged = async (chatIdx) => {
|
const onChatChanged = async (chatIdx) => {
|
||||||
log('CHAT_CHANGED', chatIdx);
|
log('CHAT_CHANGED', chatIdx);
|
||||||
|
|
Loading…
Reference in New Issue