summaryrefslogtreecommitdiff
path: root/ui/statistics/src
diff options
context:
space:
mode:
authorAdrián Sámson <13379985+adrns@users.noreply.github.com>2022-05-24 19:40:40 +0200
committerGitHub <noreply@github.com>2022-05-24 19:40:40 +0200
commit687ed5f2ffe9536f7451b00468c75a2201f2d04e (patch)
tree102f9a1dc06337864a8800be9c5330dece566365 /ui/statistics/src
parent484b6d093245ad08bd27e797c9d0082eabfcffc4 (diff)
downloadAntennaPod-687ed5f2ffe9536f7451b00468c75a2201f2d04e.zip
Open podcast from statistics (#5898)
Diffstat (limited to 'ui/statistics/src')
-rw-r--r--ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/feed/FeedStatisticsDialogFragment.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/feed/FeedStatisticsDialogFragment.java b/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/feed/FeedStatisticsDialogFragment.java
index 7109bd6a1..f0308e364 100644
--- a/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/feed/FeedStatisticsDialogFragment.java
+++ b/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/feed/FeedStatisticsDialogFragment.java
@@ -2,10 +2,13 @@ package de.danoeh.antennapod.ui.statistics.feed;
import android.app.Dialog;
import android.os.Bundle;
+
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
+
+import de.danoeh.antennapod.ui.appstartintent.MainActivityStarter;
import de.danoeh.antennapod.ui.statistics.R;
public class FeedStatisticsDialogFragment extends DialogFragment {
@@ -26,6 +29,10 @@ public class FeedStatisticsDialogFragment extends DialogFragment {
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
AlertDialog.Builder dialog = new AlertDialog.Builder(getContext());
dialog.setPositiveButton(android.R.string.ok, null);
+ dialog.setNeutralButton(R.string.open_podcast, (dialogInterface, i) -> {
+ long feedId = getArguments().getLong(EXTRA_FEED_ID);
+ new MainActivityStarter(getContext()).withOpenFeed(feedId).withAddToBackStack().start();
+ });
dialog.setTitle(getArguments().getString(EXTRA_FEED_TITLE));
dialog.setView(R.layout.feed_statistics_dialog);
return dialog.create();