From 694813ac9080cb243bc8cb15f2288c3486b5fe13 Mon Sep 17 00:00:00 2001 From: Nico-late Date: Mon, 16 Dec 2019 23:59:30 +0100 Subject: [PATCH 1/2] Fixed issue #2838 --- .../main/java/org/schabi/newpipe/download/DownloadDialog.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java index 29208b0e0..f7dcd36a7 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java @@ -38,6 +38,7 @@ import com.nononsenseapps.filepicker.Utils; import org.schabi.newpipe.MainActivity; import org.schabi.newpipe.R; +import org.schabi.newpipe.RouterActivity; import org.schabi.newpipe.extractor.MediaFormat; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.localization.Localization; @@ -368,6 +369,9 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck toolbar.setOnMenuItemClickListener(item -> { if (item.getItemId() == R.id.okay) { prepareSelectedDownload(); + if (getActivity() instanceof RouterActivity){ + getActivity().finish(); + } return true; } return false; From 6fb16bad85916e7d5daafb3267ba47f0477c0e19 Mon Sep 17 00:00:00 2001 From: Nico-late <56306738+Nico-late@users.noreply.github.com> Date: Thu, 26 Dec 2019 12:24:18 +0100 Subject: [PATCH 2/2] Update app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java Space added for more clarity Co-Authored-By: Tobias Groza --- .../main/java/org/schabi/newpipe/download/DownloadDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java index f7dcd36a7..4fbf4ab5f 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java @@ -369,7 +369,7 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck toolbar.setOnMenuItemClickListener(item -> { if (item.getItemId() == R.id.okay) { prepareSelectedDownload(); - if (getActivity() instanceof RouterActivity){ + if (getActivity() instanceof RouterActivity) { getActivity().finish(); } return true;