refactor: emit load event on reload

This commit is contained in:
Carlos Valente
2024-07-09 18:37:17 +02:00
committed by Carlos Valente
parent 84792bc00d
commit 00d34eec9b
2 changed files with 10 additions and 2 deletions
@@ -476,7 +476,13 @@ class RuntimeService {
reload() {
const state = runtimeState.getState();
if (state.eventNow) {
runtimeState.reload();
const eventId = runtimeState.reload();
if (eventId) {
logger.info(LogOrigin.Playback, `Loaded event with ID ${eventId}`);
process.nextTick(() => {
integrationService.dispatch(TimerLifeCycle.onLoad);
});
}
}
}