Skip to content

Commit

Permalink
fix: Show top level error message when video playback fails (#1130)
Browse files Browse the repository at this point in the history
Previous code showed the error message for the underlying cause, which
might be too technical for the user. Prefer to use top level error
message; hopefully that is more actionable.

Contributes to #1083
  • Loading branch information
nikclayton authored Nov 25, 2024
1 parent ccab076 commit b8cb8cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/app/pachli/fragment/ViewVideoFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class ViewVideoFragment : ViewMediaFragment() {
override fun onPlayerError(error: PlaybackException) {
val message = getString(
R.string.error_media_playback,
error.cause?.message ?: error.message,
error.message ?: error.cause?.message,
)
Snackbar.make(binding.root, message, Snackbar.LENGTH_INDEFINITE)
.setAction(app.pachli.core.ui.R.string.action_retry) { player?.prepare() }
Expand Down

0 comments on commit b8cb8cd

Please sign in to comment.