1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-26 04:52:29 +01:00

git replace getFragmentManager() with getFM()

This commit is contained in:
Christian Schabesberger 2018-08-24 12:30:23 +02:00
parent 4a19c78fa5
commit a817d8cbf9
3 changed files with 5 additions and 14 deletions

View File

@ -156,9 +156,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> 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<I, N> extends BaseStateFragment<I> 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<I, N> extends BaseStateFragment<I> implem
private void onStreamSelected(StreamInfoItem selectedItem) {
onItemSelected(selectedItem);
NavigationHelper.openVideoDetailFragment(useAsFrontPage
? getParentFragment().getFragmentManager()
: getFragmentManager(),
NavigationHelper.openVideoDetailFragment(getFM(),
selectedItem.getServiceId(), selectedItem.getUrl(), selectedItem.getName());
}

View File

@ -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);

View File

@ -322,7 +322,7 @@ public class SubscriptionFragment extends BaseStateFragment<List<SubscriptionEnt
infoListAdapter.setOnChannelSelectedListener(new OnClickGesture<ChannelInfoItem>() {
@Override
public void selected(ChannelInfoItem selectedItem) {
FragmentManager fragmentManager = getFM();
final FragmentManager fragmentManager = getFM();
NavigationHelper.openChannelFragment(fragmentManager,
selectedItem.getServiceId(),
selectedItem.getUrl(),