Add `APP_INITIALIZED` event before hideLoader in initialization sequence, before `APP_READY` fires (#5051) * Add APP_INIT event before hideLoader in initialization sequence * refactor(events): rename APP_INIT to APP_INITIALIZED --------- Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Signed| @@ -730,6 +730,7 @@ async function firstLoadInit() { | |||
| 730 | initAccessibility(); | 730 | initAccessibility(); |
| 731 | addDebugFunctions(); | 731 | addDebugFunctions(); |
| 732 | doDailyExtensionUpdatesCheck(); | 732 | doDailyExtensionUpdatesCheck(); |
| 733 | await eventSource.emit(event_types.APP_INITIALIZED); | ||
| 733 | await hideLoader(); | 734 | await hideLoader(); |
| 734 | await fixViewport(); | 735 | await fixViewport(); |
| 735 | await eventSource.emit(event_types.APP_READY); | 736 | await eventSource.emit(event_types.APP_READY); |
| @@ -1,6 +1,7 @@ | |||
| 1 | import { EventEmitter } from '../lib/eventemitter.js'; | 1 | import { EventEmitter } from '../lib/eventemitter.js'; |
| 2 | 2 | ||
| 3 | export const event_types = { | 3 | export const event_types = { |
| 4 | APP_INITIALIZED: 'app_initialized', | ||
| 4 | APP_READY: 'app_ready', | 5 | APP_READY: 'app_ready', |
| 5 | EXTRAS_CONNECTED: 'extras_connected', | 6 | EXTRAS_CONNECTED: 'extras_connected', |
| 6 | MESSAGE_SWIPED: 'message_swiped', | 7 | MESSAGE_SWIPED: 'message_swiped', |