mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
24 lines
782 B
TypeScript
24 lines
782 B
TypeScript
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
import Initialization from '@app/features/app/state/Initialization';
|
|
import Accounts from '@app/features/auth/state/Accounts';
|
|
import DeveloperOptions from '@app/features/devtools/state/DeveloperOptions';
|
|
import GatewaySessions from '@app/features/gateway/transport/GatewaySessionPool';
|
|
|
|
export function isClientBooting(): boolean {
|
|
if (DeveloperOptions.bypassLoadingSkeleton) {
|
|
return false;
|
|
}
|
|
if (DeveloperOptions.forceLoadingSkeleton) {
|
|
return true;
|
|
}
|
|
return !Initialization.hasCompletedInitialLoad;
|
|
}
|
|
|
|
export function isClientReconnecting(): boolean {
|
|
if (isClientBooting() || Accounts.transitioning) {
|
|
return false;
|
|
}
|
|
return GatewaySessions.foregroundConnection.isConnectionInterrupted || !Initialization.isReady;
|
|
}
|