-
Notifications
You must be signed in to change notification settings - Fork 781
Pause voice broadcast listening on new VB recording #7973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Kudos, SonarCloud Quality Gate passed! |
@@ -626,13 +626,17 @@ class TimelineViewModel @AssistedInject constructor( | |||
viewModelScope.launch { | |||
when (action) { | |||
VoiceBroadcastAction.Recording.Start -> { | |||
voiceBroadcastHelper.pausePlayback() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it would have been better to do this in It will introduce a circular DI issue, seems good like thisStartVoiceBroadcastUseCase.startVoiceBroadcast
(after checking if the user is allowed to start a VB). wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to do that I need to inject the VoiceBroadcastHelper
in StartVoiceBroadcastUseCase
but StartVoiceBroadcastUseCase
is already inject in VoiceBroadcastHelper
voiceBroadcastHelper.startVoiceBroadcast(room.roomId).fold( | ||
{ _viewEvents.post(RoomDetailViewEvents.ActionSuccess(action)) }, | ||
{ _viewEvents.post(RoomDetailViewEvents.ActionFailure(action, it)) }, | ||
) | ||
} | ||
VoiceBroadcastAction.Recording.Pause -> voiceBroadcastHelper.pauseVoiceBroadcast(room.roomId) | ||
VoiceBroadcastAction.Recording.Resume -> voiceBroadcastHelper.resumeVoiceBroadcast(room.roomId) | ||
VoiceBroadcastAction.Recording.Resume -> { | ||
voiceBroadcastHelper.pausePlayback() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
#7830