diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java index 1db12bba9..c70ea2b19 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java @@ -156,9 +156,7 @@ public abstract class BaseListFragment extends BaseStateFragment implem public void selected(ChannelInfoItem selectedItem) { try { onItemSelected(selectedItem); - NavigationHelper.openChannelFragment(useAsFrontPage ? - getParentFragment().getFragmentManager() - : getFragmentManager(), + NavigationHelper.openChannelFragment(getFM(), selectedItem.getServiceId(), selectedItem.getUrl(), selectedItem.getName()); @@ -173,10 +171,7 @@ public abstract class BaseListFragment extends BaseStateFragment implem public void selected(PlaylistInfoItem selectedItem) { try { onItemSelected(selectedItem); - NavigationHelper.openPlaylistFragment( - useAsFrontPage - ? getParentFragment().getFragmentManager() - : getFragmentManager(), + NavigationHelper.openPlaylistFragment(getFM(), selectedItem.getServiceId(), selectedItem.getUrl(), selectedItem.getName()); @@ -197,9 +192,7 @@ public abstract class BaseListFragment extends BaseStateFragment implem private void onStreamSelected(StreamInfoItem selectedItem) { onItemSelected(selectedItem); - NavigationHelper.openVideoDetailFragment(useAsFrontPage - ? getParentFragment().getFragmentManager() - : getFragmentManager(), + NavigationHelper.openVideoDetailFragment(getFM(), selectedItem.getServiceId(), selectedItem.getUrl(), selectedItem.getName()); } diff --git a/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java index add69048a..95aeb09d7 100644 --- a/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java @@ -140,9 +140,7 @@ public class StatisticsPlaylistFragment public void selected(LocalItem selectedItem) { if (selectedItem instanceof StreamStatisticsEntry) { final StreamStatisticsEntry item = (StreamStatisticsEntry) selectedItem; - NavigationHelper.openVideoDetailFragment(useAsFrontPage - ? getParentFragment().getFragmentManager() - : getFragmentManager(), + NavigationHelper.openVideoDetailFragment(getFM(), item.serviceId, item.url, item.title); diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index fd044039b..d8a26f0eb 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -322,7 +322,7 @@ public class SubscriptionFragment extends BaseStateFragment() { @Override public void selected(ChannelInfoItem selectedItem) { - FragmentManager fragmentManager = getFM(); + final FragmentManager fragmentManager = getFM(); NavigationHelper.openChannelFragment(fragmentManager, selectedItem.getServiceId(), selectedItem.getUrl(),