Prevent ringing until app hasInitialLoadCompleted
This commit is contained in:
parent
73e8bec42f
commit
f61954ee5b
3 changed files with 15 additions and 1 deletions
|
@ -72,6 +72,7 @@ const createProps = (storyProps: Partial<PropsType> = {}): PropsType => ({
|
||||||
getPreferredBadge: () => undefined,
|
getPreferredBadge: () => undefined,
|
||||||
getPresentingSources: action('get-presenting-sources'),
|
getPresentingSources: action('get-presenting-sources'),
|
||||||
hangUpActiveCall: action('hang-up-active-call'),
|
hangUpActiveCall: action('hang-up-active-call'),
|
||||||
|
hasInitialLoadCompleted: true,
|
||||||
i18n,
|
i18n,
|
||||||
incomingCall: null,
|
incomingCall: null,
|
||||||
callLink: undefined,
|
callLink: undefined,
|
||||||
|
|
|
@ -104,6 +104,7 @@ export type PropsType = {
|
||||||
bounceAppIconStart: () => unknown;
|
bounceAppIconStart: () => unknown;
|
||||||
bounceAppIconStop: () => unknown;
|
bounceAppIconStop: () => unknown;
|
||||||
declineCall: (_: DeclineCallType) => void;
|
declineCall: (_: DeclineCallType) => void;
|
||||||
|
hasInitialLoadCompleted: boolean;
|
||||||
i18n: LocalizerType;
|
i18n: LocalizerType;
|
||||||
isGroupCallRaiseHandEnabled: boolean;
|
isGroupCallRaiseHandEnabled: boolean;
|
||||||
isGroupCallReactionsEnabled: boolean;
|
isGroupCallReactionsEnabled: boolean;
|
||||||
|
@ -581,9 +582,20 @@ function getShouldRing({
|
||||||
activeCall,
|
activeCall,
|
||||||
incomingCall,
|
incomingCall,
|
||||||
isConversationTooBigToRing,
|
isConversationTooBigToRing,
|
||||||
|
hasInitialLoadCompleted,
|
||||||
}: Readonly<
|
}: Readonly<
|
||||||
Pick<PropsType, 'activeCall' | 'incomingCall' | 'isConversationTooBigToRing'>
|
Pick<
|
||||||
|
PropsType,
|
||||||
|
| 'activeCall'
|
||||||
|
| 'incomingCall'
|
||||||
|
| 'isConversationTooBigToRing'
|
||||||
|
| 'hasInitialLoadCompleted'
|
||||||
|
>
|
||||||
>): boolean {
|
>): boolean {
|
||||||
|
if (!hasInitialLoadCompleted) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (incomingCall != null) {
|
if (incomingCall != null) {
|
||||||
// don't ring a large group
|
// don't ring a large group
|
||||||
if (isConversationTooBigToRing) {
|
if (isConversationTooBigToRing) {
|
||||||
|
|
|
@ -425,6 +425,7 @@ const mapStateToProps = (state: StateType) => {
|
||||||
availableCameras: state.calling.availableCameras,
|
availableCameras: state.calling.availableCameras,
|
||||||
getGroupCallVideoFrameSource,
|
getGroupCallVideoFrameSource,
|
||||||
getPreferredBadge: getPreferredBadgeSelector(state),
|
getPreferredBadge: getPreferredBadgeSelector(state),
|
||||||
|
hasInitialLoadCompleted: state.app.hasInitialLoadCompleted,
|
||||||
i18n: getIntl(state),
|
i18n: getIntl(state),
|
||||||
isGroupCallRaiseHandEnabled: isGroupCallRaiseHandEnabled(),
|
isGroupCallRaiseHandEnabled: isGroupCallRaiseHandEnabled(),
|
||||||
isGroupCallReactionsEnabled: isGroupCallReactionsEnabled(),
|
isGroupCallReactionsEnabled: isGroupCallReactionsEnabled(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue