func receive()

in AzureCommunicationUI/sdk/AzureCommunicationUICalling/Sources/Presentation/SwiftUI/Calling/CallingViewModel.swift [233:298]


    func receive(_ state: AppState) {
        if appState != state.lifeCycleState.currentStatus {
            appState = state.lifeCycleState.currentStatus
        }

        guard state.visibilityState.currentStatus != .hidden else {
            return
        }
        participantListViewModel.update(localUserState: state.localUserState,
                                        remoteParticipantsState: state.remoteParticipantsState,
                                        isDisplayed: state.navigationState.participantsVisible)

        participantActionViewModel.update(localUserState: state.localUserState,
                                          isDisplayed: state.navigationState.participantActionsVisible,
                                          participantInfoModel: state.navigationState.selectedParticipant)
        audioDeviceListViewModel.update(
            audioDeviceStatus: state.localUserState.audioState.device,
            navigationState: state.navigationState,
            visibilityState: state.visibilityState)
        leaveCallConfirmationViewModel.update(state: state)
        supportFormViewModel.update(state: state)
        captionsRttListViewModel.update(state: state)
        captionsInfoViewModel.update(state: state)
        captionsLanguageListViewModel.update(state: state)
        captionsErrorViewModel.update(captionsState: state.captionsState, callingState: state.callingState)
        controlBarViewModel.update(localUserState: state.localUserState,
                                   permissionState: state.permissionState,
                                   callingState: state.callingState,
                                   visibilityState: state.visibilityState,
                                   navigationState: state.navigationState,
                                   buttonViewDataState: state.buttonViewDataState)
        infoHeaderViewModel.update(localUserState: state.localUserState,
                                   remoteParticipantsState: state.remoteParticipantsState,
                                   callingState: state.callingState,
                                   visibilityState: state.visibilityState,
                                   callScreenInfoHeaderState: state.callScreenInfoHeaderState
                                   ,
                                   buttonViewDataState: state.buttonViewDataState
                                   )
        localVideoViewModel.update(localUserState: state.localUserState,
                                   visibilityState: state.visibilityState)
        lobbyWaitingHeaderViewModel.update(localUserState: state.localUserState,
                                           remoteParticipantsState: state.remoteParticipantsState,
                                           callingState: state.callingState,
                                           visibilityState: state.visibilityState)
        lobbyActionErrorViewModel.update(localUserState: state.localUserState,
                                         remoteParticipantsState: state.remoteParticipantsState,
                                         callingState: state.callingState)
        participantGridsViewModel.update(callingState: state.callingState,
                                         captionsState: state.captionsState,
                                         rttState: state.rttState,
                                         remoteParticipantsState: state.remoteParticipantsState,
                                         visibilityState: state.visibilityState, lifeCycleState: state.lifeCycleState)
        bannerViewModel.update(callingState: state.callingState,
                               visibilityState: state.visibilityState)
        lobbyOverlayViewModel.update(callingStatus: state.callingState.status)
        onHoldOverlayViewModel.update(callingStatus: state.callingState.status,
                                      audioSessionStatus: state.audioSessionState.status)

        moreCallOptionsListViewModel.update(navigationState: state.navigationState,
                                            rttState: state.rttState,
                                            visibilityState: state.visibilityState,
                                            buttonViewDataState: state.buttonViewDataState)

        receiveExtension(state)
    }