From 53edd054aae97b1928b2d4f638312e12f4b4c4ce Mon Sep 17 00:00:00 2001
From: Jacob Hawkins
Date: Thu, 17 Oct 2024 15:14:15 +1100
Subject: [PATCH 1/6] Project now runs
---
README.md | 3 ++-
app/src/main/res/layout-land/list_stream_card_item.xml | 10 +++++++++-
settings.gradle | 10 +++++-----
3 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 001f0eeab7a..b1079c22a18 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,8 @@
Screenshots • Supported Services • Description • Features • Installation and updates • Contribution • Donate • License
-Website • Blog • FAQ • Press
+Website • Blog • FAQ • Press
*Read this document in other languages: [Deutsch](doc/README.de.md), [English](README.md), [Español](doc/README.es.md), [Français](doc/README.fr.md), [हिन्दी](doc/README.hi.md), [Italiano](doc/README.it.md), [한국어](doc/README.ko.md), [Português Brasil](doc/README.pt_BR.md), [Polski](doc/README.pl.md), [ਪੰਜਾਬੀ ](doc/README.pa.md), [日本語](doc/README.ja.md), [Română](doc/README.ro.md), [Soomaali](doc/README.so.md), [Türkçe](doc/README.tr.md), [正體中文](doc/README.zh_TW.md), [অসমীয়া](doc/README.asm.md), [Српски](doc/README.sr.md)*
diff --git a/app/src/main/res/layout-land/list_stream_card_item.xml b/app/src/main/res/layout-land/list_stream_card_item.xml
index 70228ee1d20..ad12c229095 120000
--- a/app/src/main/res/layout-land/list_stream_card_item.xml
+++ b/app/src/main/res/layout-land/list_stream_card_item.xml
@@ -1 +1,9 @@
-../layout/list_stream_item.xml
\ No newline at end of file
+
+
+
+
+
+
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index 0338fde6c55..a0aed95275d 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -4,8 +4,8 @@ include ':app'
// We assume, that NewPipe and NewPipe Extractor have the same parent directory.
// If this is not the case, please change the path in includeBuild().
-//includeBuild('../NewPipeExtractor') {
-// dependencySubstitution {
-// substitute module('com.github.TeamNewPipe:NewPipeExtractor') using project(':extractor')
-// }
-//}
+includeBuild('../NewPipeExtractor') {
+ dependencySubstitution {
+ substitute module('com.github.TeamNewPipe:NewPipeExtractor') using project(':extractor')
+ }
+}
From 0cf4732d8a8b99d81cd6c9d29303cd731c7393a5 Mon Sep 17 00:00:00 2001
From: Elva Kang
Date: Sat, 19 Oct 2024 19:43:34 +1100
Subject: [PATCH 2/6] Fix UI crash when user navigates away before the download
dialog appears
---
.../newpipe/info_list/dialog/StreamDialogDefaultEntry.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java b/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
index 948a8274cd1..6b9e38b98ae 100644
--- a/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
+++ b/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
@@ -113,7 +113,7 @@ public enum StreamDialogDefaultEntry {
DOWNLOAD(R.string.download, (fragment, item) ->
fetchStreamInfoAndSaveToDatabase(fragment.requireContext(), item.getServiceId(),
item.getUrl(), info -> {
- if (fragment.getContext() != null) {
+ if (fragment.isAdded() && !fragment.isStateSaved()) {
final DownloadDialog downloadDialog =
new DownloadDialog(fragment.requireContext(), info);
downloadDialog.show(fragment.getChildFragmentManager(),
From 2eb256799d886970aab45f031d6efbc8e042bb10 Mon Sep 17 00:00:00 2001
From: Elva Kang
Date: Sun, 20 Oct 2024 10:29:48 +1100
Subject: [PATCH 3/6] Revert "Project now runs"
This reverts commit 53edd054aae97b1928b2d4f638312e12f4b4c4ce.
---
README.md | 3 +--
app/src/main/res/layout-land/list_stream_card_item.xml | 10 +---------
settings.gradle | 10 +++++-----
3 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/README.md b/README.md
index b1079c22a18..001f0eeab7a 100644
--- a/README.md
+++ b/README.md
@@ -17,8 +17,7 @@
Screenshots • Supported Services • Description • Features • Installation and updates • Contribution • Donate • License
-Website • Blog • FAQ • Press
+Website • Blog • FAQ • Press
*Read this document in other languages: [Deutsch](doc/README.de.md), [English](README.md), [Español](doc/README.es.md), [Français](doc/README.fr.md), [हिन्दी](doc/README.hi.md), [Italiano](doc/README.it.md), [한국어](doc/README.ko.md), [Português Brasil](doc/README.pt_BR.md), [Polski](doc/README.pl.md), [ਪੰਜਾਬੀ ](doc/README.pa.md), [日本語](doc/README.ja.md), [Română](doc/README.ro.md), [Soomaali](doc/README.so.md), [Türkçe](doc/README.tr.md), [正體中文](doc/README.zh_TW.md), [অসমীয়া](doc/README.asm.md), [Српски](doc/README.sr.md)*
diff --git a/app/src/main/res/layout-land/list_stream_card_item.xml b/app/src/main/res/layout-land/list_stream_card_item.xml
index ad12c229095..70228ee1d20 120000
--- a/app/src/main/res/layout-land/list_stream_card_item.xml
+++ b/app/src/main/res/layout-land/list_stream_card_item.xml
@@ -1,9 +1 @@
-
-
-
-
-
-
\ No newline at end of file
+../layout/list_stream_item.xml
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index a0aed95275d..0338fde6c55 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -4,8 +4,8 @@ include ':app'
// We assume, that NewPipe and NewPipe Extractor have the same parent directory.
// If this is not the case, please change the path in includeBuild().
-includeBuild('../NewPipeExtractor') {
- dependencySubstitution {
- substitute module('com.github.TeamNewPipe:NewPipeExtractor') using project(':extractor')
- }
-}
+//includeBuild('../NewPipeExtractor') {
+// dependencySubstitution {
+// substitute module('com.github.TeamNewPipe:NewPipeExtractor') using project(':extractor')
+// }
+//}
From 1ed4928f40f2e5297e265a1f732f7ee624b71b89 Mon Sep 17 00:00:00 2001
From: Elva Kang
Date: Thu, 24 Oct 2024 11:47:23 +1100
Subject: [PATCH 4/6] Add comment for fragment lifecycle checks before showing
DownloadDialog
---
.../newpipe/info_list/dialog/StreamDialogDefaultEntry.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java b/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
index 6b9e38b98ae..a486bdc3a8a 100644
--- a/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
+++ b/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
@@ -113,6 +113,8 @@ public enum StreamDialogDefaultEntry {
DOWNLOAD(R.string.download, (fragment, item) ->
fetchStreamInfoAndSaveToDatabase(fragment.requireContext(), item.getServiceId(),
item.getUrl(), info -> {
+ // Ensure the fragment is attached and its state hasn't been saved to avoid
+ // showing the dialog during lifecycle changes or when the activity is paused.
if (fragment.isAdded() && !fragment.isStateSaved()) {
final DownloadDialog downloadDialog =
new DownloadDialog(fragment.requireContext(), info);
From 0190bcee2585e7451a3bf5fe68ccb19870683941 Mon Sep 17 00:00:00 2001
From: Elva Kang
Date: Thu, 24 Oct 2024 16:04:53 +1100
Subject: [PATCH 5/6] Fix line length violation
---
.../newpipe/info_list/dialog/StreamDialogDefaultEntry.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java b/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
index a486bdc3a8a..2359ee5377d 100644
--- a/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
+++ b/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
@@ -114,7 +114,7 @@ public enum StreamDialogDefaultEntry {
fetchStreamInfoAndSaveToDatabase(fragment.requireContext(), item.getServiceId(),
item.getUrl(), info -> {
// Ensure the fragment is attached and its state hasn't been saved to avoid
- // showing the dialog during lifecycle changes or when the activity is paused.
+ // showing dialog during lifecycle changes or when the activity is paused.
if (fragment.isAdded() && !fragment.isStateSaved()) {
final DownloadDialog downloadDialog =
new DownloadDialog(fragment.requireContext(), info);
From f4baf4628eec5e303421e08f27536a23b726ee7b Mon Sep 17 00:00:00 2001
From: Tobi
Date: Sun, 27 Oct 2024 09:41:45 +0100
Subject: [PATCH 6/6] Update
app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
---
.../newpipe/info_list/dialog/StreamDialogDefaultEntry.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java b/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
index 2359ee5377d..c7ac9556f85 100644
--- a/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
+++ b/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
@@ -114,7 +114,8 @@ public enum StreamDialogDefaultEntry {
fetchStreamInfoAndSaveToDatabase(fragment.requireContext(), item.getServiceId(),
item.getUrl(), info -> {
// Ensure the fragment is attached and its state hasn't been saved to avoid
- // showing dialog during lifecycle changes or when the activity is paused.
+ // showing dialog during lifecycle changes or when the activity is paused,
+ // e.g. by selecting the download option and opening a different fragment.
if (fragment.isAdded() && !fragment.isStateSaved()) {
final DownloadDialog downloadDialog =
new DownloadDialog(fragment.requireContext(), info);