[Calling][Bugfix] Dont notify capabilities onstart (#1035)
This commit is contained in:
Родитель
5643cfe08b
Коммит
c375b23230
|
@ -704,11 +704,12 @@ internal class CallingMiddlewareActionHandlerImpl(
|
|||
(it.type == ParticipantCapabilityType.MANAGE_LOBBY && !it.isAllowed)
|
||||
}
|
||||
|
||||
store.dispatch(
|
||||
ToastNotificationAction.ShowNotification(
|
||||
if (anyLostCapability) ToastNotificationKind.SOME_FEATURES_LOST else ToastNotificationKind.SOME_FEATURES_GAINED
|
||||
if (anyLostCapability || !store.getCurrentState().localParticipantState.currentCapabilitiesAreDefault)
|
||||
store.dispatch(
|
||||
ToastNotificationAction.ShowNotification(
|
||||
if (anyLostCapability) ToastNotificationKind.SOME_FEATURES_LOST else ToastNotificationKind.SOME_FEATURES_GAINED
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import com.azure.android.communication.ui.calling.redux.state.AppReduxState
|
|||
internal class AppStateReducer(
|
||||
private val callStateReducer: CallStateReducer,
|
||||
private val participantStateReducer: ParticipantStateReducer,
|
||||
private val deviceStateReducer: LocalParticipantStateReducer,
|
||||
private val localParticipantReducer: LocalParticipantStateReducer,
|
||||
private val permissionStateReducer: PermissionStateReducer,
|
||||
private val lifecycleReducer: LifecycleReducer,
|
||||
private val errorReducer: ErrorReducer,
|
||||
|
@ -41,7 +41,7 @@ internal class AppStateReducer(
|
|||
action
|
||||
)
|
||||
|
||||
appState.localParticipantState = deviceStateReducer.reduce(
|
||||
appState.localParticipantState = localParticipantReducer.reduce(
|
||||
state.localParticipantState,
|
||||
action
|
||||
)
|
||||
|
|
|
@ -246,7 +246,8 @@ internal class LocalParticipantStateReducerImpl : LocalParticipantStateReducer {
|
|||
}
|
||||
is LocalParticipantAction.SetCapabilities -> {
|
||||
localUserState.copy(
|
||||
capabilities = action.capabilities
|
||||
capabilities = action.capabilities,
|
||||
currentCapabilitiesAreDefault = false,
|
||||
)
|
||||
}
|
||||
else -> localUserState
|
||||
|
|
|
@ -53,6 +53,7 @@ internal class AppReduxState(
|
|||
ParticipantCapabilityType.TURN_VIDEO_ON,
|
||||
ParticipantCapabilityType.UNMUTE_MICROPHONE
|
||||
),
|
||||
currentCapabilitiesAreDefault = true,
|
||||
)
|
||||
|
||||
override var permissionState: PermissionState =
|
||||
|
|
|
@ -83,4 +83,5 @@ internal data class LocalUserState(
|
|||
val localParticipantRole: ParticipantRole?,
|
||||
val audioVideoMode: CallCompositeAudioVideoMode = CallCompositeAudioVideoMode.AUDIO_AND_VIDEO,
|
||||
val capabilities: Set<ParticipantCapabilityType> = emptySet(),
|
||||
val currentCapabilitiesAreDefault: Boolean = true,
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче