Handle all server status changes

This commit is contained in:
Gabe Kangas 2022-11-13 14:50:20 -08:00
parent d2f65380a1
commit c5f02a091b
No known key found for this signature in database
GPG key ID: 9A56337728BC81EA

View file

@ -347,14 +347,16 @@ export const ClientConfigStore: FC = () => {
useEffect(() => {
if (hasLoadedStatus && hasLoadedConfig) {
sendEvent(AppStateEvent.Loaded);
}
}, [hasLoadedStatus, hasLoadedConfig]);
useEffect(() => {
if (serverStatus.online) {
sendEvent(AppStateEvent.Online);
} else {
sendEvent(AppStateEvent.Offline);
}
}
}, [hasLoadedStatus, hasLoadedConfig]);
}, [serverStatus]);
useEffect(() => {
if (!clientConfig.chatDisabled && accessToken && hasLoadedConfig) {