From b14f65804d811d8ee311fcb79694cf404741cda7 Mon Sep 17 00:00:00 2001 From: rmtilde Date: Wed, 16 Oct 2024 23:58:32 +1100 Subject: [PATCH] Added comments to explain changes --- .../newpipe/fragments/list/videos/RelatedItemsFragment.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedItemsFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedItemsFragment.java index a7ca549fb0f..6dc9a0cb484 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedItemsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedItemsFragment.java @@ -181,6 +181,9 @@ protected ItemViewMode getItemViewMode() { protected void showInfoItemDialog(final StreamInfoItem item) { try { final Fragment parentFragment = getParentFragment(); + + // Try and attach the InfoItemDialog to the parent fragment of the RelatedItemsFragment + // so that its context is not lost when the RelatedItemsFragment is reinitialized. if (parentFragment != null) { new InfoItemDialog.Builder( parentFragment.getActivity(),