diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2022-11-30 21:16:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-30 21:16:13 +0100 |
commit | bc3b7179112e986958bbb4773419ec94eb3aa67f (patch) | |
tree | 258b84d762588e8fe9d7491dde67c9367da02461 /app/src/main/java/de/danoeh/antennapod/dialog | |
parent | bec1eaa679745c4302bf562bf89eea2d895fa8fe (diff) | |
parent | 75a795e3d744fc78175deff79ccb2aeae113da0a (diff) | |
download | AntennaPod-bc3b7179112e986958bbb4773419ec94eb3aa67f.zip |
Merge pull request #6200 from ByteHamster/detailed-error-message
Show human readable error message on details dialog
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/dialog')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/dialog/DownloadLogDetailsDialog.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/DownloadLogDetailsDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/DownloadLogDetailsDialog.java index 023d0a152..5e28639dd 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/DownloadLogDetailsDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/DownloadLogDetailsDialog.java @@ -8,6 +8,7 @@ import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import de.danoeh.antennapod.R; +import de.danoeh.antennapod.core.util.DownloadErrorLabel; import de.danoeh.antennapod.model.download.DownloadStatus; import de.danoeh.antennapod.core.storage.DBReader; import de.danoeh.antennapod.event.MessageEvent; @@ -21,7 +22,6 @@ public class DownloadLogDetailsDialog extends MaterialAlertDialogBuilder { super(context); String url = "unknown"; - String message = context.getString(R.string.download_successful); if (status.getFeedfileType() == FeedMedia.FEEDFILETYPE_FEEDMEDIA) { FeedMedia media = DBReader.getFeedMedia(status.getFeedfileId()); if (media != null) { @@ -34,11 +34,13 @@ public class DownloadLogDetailsDialog extends MaterialAlertDialogBuilder { } } + String message = context.getString(R.string.download_successful); if (!status.isSuccessful()) { message = status.getReasonDetailed(); } - String messageFull = context.getString(R.string.download_error_details_message, message, url); + String messageFull = context.getString(R.string.download_log_details_message, + context.getString(DownloadErrorLabel.from(status.getReason())), message, url); setTitle(R.string.download_error_details); setMessage(messageFull); setPositiveButton(android.R.string.ok, null); |