-
Notifications
You must be signed in to change notification settings - Fork 500
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
Improve error handling during a voice broadcast playback #7321
Conversation
Codecov ReportBase: 12.02% // Head: 12.02% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## develop #7321 +/- ##
========================================
Coverage 12.02% 12.02%
========================================
Files 1630 1630
Lines 161272 161272
Branches 66073 66073
========================================
Hits 19391 19391
Misses 141237 141237
Partials 644 644
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
SGTM, just one comment
Tests ok
@@ -531,11 +579,16 @@ extension VoiceBroadcastPlaybackViewModel: VoiceMessageAudioPlayerDelegate { | |||
|
|||
func audioPlayer(_ audioPlayer: VoiceMessageAudioPlayer, didFailWithError error: Error) { | |||
state.playbackState = .error | |||
self.updateErrorState() |
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.
you should remove self.
here
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.
Done.
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.
SGTM
Kudos, SonarCloud Quality Gate passed! |
This PR fixes #7311 by pausing the voice broadcast playback if an error occurs. Also, the error is only displayed when playback stops.