mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 23:12:13 +00:00
dispatch LoadCtx on app run
This commit is contained in:
parent
ec1efd2a49
commit
433a855659
1 changed files with 3 additions and 0 deletions
|
|
@ -22,6 +22,9 @@ const App = () => {
|
|||
};
|
||||
const onCoreStateChanged = () => {
|
||||
setCoreInitialized(services.core.active || services.core.error instanceof Error);
|
||||
if (services.core.active) {
|
||||
services.core.dispatch({ action: 'LoadCtx' });
|
||||
}
|
||||
};
|
||||
services.shell.on('stateChanged', onShellStateChanged);
|
||||
services.core.on('stateChanged', onCoreStateChanged);
|
||||
|
|
|
|||
Loading…
Reference in a new issue