diff --git a/ts/components/CallManager.stories.tsx b/ts/components/CallManager.stories.tsx index 98965ed25d..f8322d1fef 100644 --- a/ts/components/CallManager.stories.tsx +++ b/ts/components/CallManager.stories.tsx @@ -72,6 +72,7 @@ const createProps = (storyProps: Partial = {}): PropsType => ({ getPreferredBadge: () => undefined, getPresentingSources: action('get-presenting-sources'), hangUpActiveCall: action('hang-up-active-call'), + hasInitialLoadCompleted: true, i18n, incomingCall: null, callLink: undefined, diff --git a/ts/components/CallManager.tsx b/ts/components/CallManager.tsx index f51315a3bf..00bc18081c 100644 --- a/ts/components/CallManager.tsx +++ b/ts/components/CallManager.tsx @@ -104,6 +104,7 @@ export type PropsType = { bounceAppIconStart: () => unknown; bounceAppIconStop: () => unknown; declineCall: (_: DeclineCallType) => void; + hasInitialLoadCompleted: boolean; i18n: LocalizerType; isGroupCallRaiseHandEnabled: boolean; isGroupCallReactionsEnabled: boolean; @@ -581,9 +582,20 @@ function getShouldRing({ activeCall, incomingCall, isConversationTooBigToRing, + hasInitialLoadCompleted, }: Readonly< - Pick + Pick< + PropsType, + | 'activeCall' + | 'incomingCall' + | 'isConversationTooBigToRing' + | 'hasInitialLoadCompleted' + > >): boolean { + if (!hasInitialLoadCompleted) { + return false; + } + if (incomingCall != null) { // don't ring a large group if (isConversationTooBigToRing) { diff --git a/ts/state/smart/CallManager.tsx b/ts/state/smart/CallManager.tsx index 150b0e72bc..2580168763 100644 --- a/ts/state/smart/CallManager.tsx +++ b/ts/state/smart/CallManager.tsx @@ -425,6 +425,7 @@ const mapStateToProps = (state: StateType) => { availableCameras: state.calling.availableCameras, getGroupCallVideoFrameSource, getPreferredBadge: getPreferredBadgeSelector(state), + hasInitialLoadCompleted: state.app.hasInitialLoadCompleted, i18n: getIntl(state), isGroupCallRaiseHandEnabled: isGroupCallRaiseHandEnabled(), isGroupCallReactionsEnabled: isGroupCallReactionsEnabled(),