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

Track errors in VoiceMessagePresenter #1667

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Conversation

julioromano
Copy link
Contributor

@julioromano julioromano commented Oct 27, 2023

@julioromano julioromano self-assigned this Oct 27, 2023
@julioromano julioromano requested a review from a team as a code owner October 27, 2023 14:04
@julioromano julioromano requested review from bmarty and removed request for a team October 27, 2023 14:04
@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/nFtEFp

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a07286a) 63.24% compared to head (28bd8ad) 63.24%.

❗ Current head 28bd8ad differs from pull request most recent head f0d722c. Consider uploading reports for the commit f0d722c to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1667   +/-   ##
========================================
  Coverage    63.24%   63.24%           
========================================
  Files         1230     1230           
  Lines        31748    31751    +3     
  Branches      6534     6534           
========================================
+ Hits         20079    20082    +3     
  Misses        8667     8667           
  Partials      3002     3002           
Files Coverage Δ
...ssages/impl/voicemessages/VoiceMessageException.kt 100.00% <100.00%> (ø)
...pl/voicemessages/timeline/VoiceMessagePresenter.kt 89.65% <100.00%> (+0.36%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

scope.launch {
play.runUpdatingState(
errorTransform = {
it.apply {
Copy link
Member

Choose a reason for hiding this comment

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

The apply is not necessary, I would simply write

errorTransform = {
    analyticsService.trackError(
        VoiceMessageException.PlayMessageError("Error while trying to play voice message", it)
    )
    it
},

to improve readability.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had it exactly like that before but it looked odd to my eyes so I switched to using apply 😆

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

LGTM modulo a minor nit comment.

@julioromano
Copy link
Contributor Author

LGTM modulo a minor nit comment.

Done

@julioromano julioromano enabled auto-merge (squash) October 27, 2023 15:03
@sonarcloud
Copy link

sonarcloud bot commented Oct 27, 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

@julioromano julioromano merged commit 81122ec into develop Oct 27, 2023
14 checks passed
@julioromano julioromano deleted the julioromano/track_error branch October 27, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants