Skip to content

Commit

Permalink
Update app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDi…
Browse files Browse the repository at this point in the history
…alogDefaultEntry.java
  • Loading branch information
TobiGr authored Oct 27, 2024
1 parent 0190bce commit f4baf46
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f4baf46

Please sign in to comment.