Skip to content
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

Merged
merged 2 commits into from
Feb 1, 2023

Conversation

nimau
Copy link
Contributor

@nimau nimau commented Jan 31, 2023

This PR fixes #7311 by pausing the voice broadcast playback if an error occurs. Also, the error is only displayed when playback stops.

@nimau nimau requested review from manuroe, yostyle and giomfo January 31, 2023 10:22
@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Base: 12.02% // Head: 12.02% // No change to project coverage 👍

Coverage data is based on head (ed35e1f) compared to base (cfe166b).
Patch coverage: 38.39% of modified lines in pull request are covered.

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           
Flag Coverage Δ
uitests 55.64% <82.60%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ot/Categories/MatrixSDKCrypto+LocalizedError.swift 0.00% <0.00%> (ø)
Riot/Modules/Analytics/DecryptionFailure.swift 0.00% <ø> (ø)
Riot/Modules/Analytics/DecryptionFailureTracker.m 35.22% <ø> (ø)
...alytics/Helpers/MXCallHangupReason+Analytics.swift 0.00% <0.00%> (ø)
...KeyBackupRecoverFromPrivateKeyViewController.swift 0.00% <0.00%> (ø)
...eKey/KeyBackupRecoverFromPrivateKeyViewModel.swift 0.00% <0.00%> (ø)
Riot/Modules/Settings/SettingsViewController.m 0.00% <0.00%> (ø)
Riot/Utils/EventFormatter.m 8.05% <0.00%> (ø)
...llHistory/Coordinator/PollHistoryCoordinator.swift 0.00% <0.00%> (ø)
...History/Service/MatrixSDK/PollHistoryService.swift 0.00% <0.00%> (ø)
... and 31 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.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@giomfo giomfo left a 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()
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@yostyle yostyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

@nimau nimau merged commit 223224c into develop Feb 1, 2023
@nimau nimau deleted the nimau/7311_vb_error_handling branch February 1, 2023 13:44
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants