Fix some older deprecations from previous Fragment versions
This commit is contained in:
parent
9591f14551
commit
e4885e3c52
|
@ -23,13 +23,9 @@ public class ImportConfirmationDialog extends DialogFragment {
|
||||||
|
|
||||||
public static void show(@NonNull final Fragment fragment,
|
public static void show(@NonNull final Fragment fragment,
|
||||||
@NonNull final Intent resultServiceIntent) {
|
@NonNull final Intent resultServiceIntent) {
|
||||||
if (fragment.getFragmentManager() == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final ImportConfirmationDialog confirmationDialog = new ImportConfirmationDialog();
|
final ImportConfirmationDialog confirmationDialog = new ImportConfirmationDialog();
|
||||||
confirmationDialog.setResultServiceIntent(resultServiceIntent);
|
confirmationDialog.setResultServiceIntent(resultServiceIntent);
|
||||||
confirmationDialog.show(fragment.getFragmentManager(), null);
|
confirmationDialog.show(fragment.getParentFragmentManager(), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setResultServiceIntent(final Intent resultServiceIntent) {
|
public void setResultServiceIntent(final Intent resultServiceIntent) {
|
||||||
|
|
|
@ -198,7 +198,7 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun openReorderDialog() {
|
private fun openReorderDialog() {
|
||||||
FeedGroupReorderDialog().show(requireFragmentManager(), null)
|
FeedGroupReorderDialog().show(parentFragmentManager, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
|
|
|
@ -192,13 +192,13 @@ public class ChooseTabsFragment extends Fragment {
|
||||||
final SelectKioskFragment selectKioskFragment = new SelectKioskFragment();
|
final SelectKioskFragment selectKioskFragment = new SelectKioskFragment();
|
||||||
selectKioskFragment.setOnSelectedListener((serviceId, kioskId, kioskName) ->
|
selectKioskFragment.setOnSelectedListener((serviceId, kioskId, kioskName) ->
|
||||||
addTab(new Tab.KioskTab(serviceId, kioskId)));
|
addTab(new Tab.KioskTab(serviceId, kioskId)));
|
||||||
selectKioskFragment.show(requireFragmentManager(), "select_kiosk");
|
selectKioskFragment.show(getParentFragmentManager(), "select_kiosk");
|
||||||
return;
|
return;
|
||||||
case CHANNEL:
|
case CHANNEL:
|
||||||
final SelectChannelFragment selectChannelFragment = new SelectChannelFragment();
|
final SelectChannelFragment selectChannelFragment = new SelectChannelFragment();
|
||||||
selectChannelFragment.setOnSelectedListener((serviceId, url, name) ->
|
selectChannelFragment.setOnSelectedListener((serviceId, url, name) ->
|
||||||
addTab(new Tab.ChannelTab(serviceId, url, name)));
|
addTab(new Tab.ChannelTab(serviceId, url, name)));
|
||||||
selectChannelFragment.show(requireFragmentManager(), "select_channel");
|
selectChannelFragment.show(getParentFragmentManager(), "select_channel");
|
||||||
return;
|
return;
|
||||||
case PLAYLIST:
|
case PLAYLIST:
|
||||||
final SelectPlaylistFragment selectPlaylistFragment = new SelectPlaylistFragment();
|
final SelectPlaylistFragment selectPlaylistFragment = new SelectPlaylistFragment();
|
||||||
|
@ -215,7 +215,7 @@ public class ChooseTabsFragment extends Fragment {
|
||||||
addTab(new Tab.PlaylistTab(serviceId, url, name));
|
addTab(new Tab.PlaylistTab(serviceId, url, name));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
selectPlaylistFragment.show(requireFragmentManager(), "select_playlist");
|
selectPlaylistFragment.show(getParentFragmentManager(), "select_playlist");
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
addTab(type.getTab());
|
addTab(type.getTab());
|
||||||
|
|
|
@ -66,16 +66,14 @@ public enum StreamDialogEntry {
|
||||||
}), // has to be set manually
|
}), // has to be set manually
|
||||||
|
|
||||||
append_playlist(R.string.append_playlist, (fragment, item) -> {
|
append_playlist(R.string.append_playlist, (fragment, item) -> {
|
||||||
if (fragment.getFragmentManager() != null) {
|
final PlaylistAppendDialog d = PlaylistAppendDialog
|
||||||
final PlaylistAppendDialog d = PlaylistAppendDialog
|
.fromStreamInfoItems(Collections.singletonList(item));
|
||||||
.fromStreamInfoItems(Collections.singletonList(item));
|
|
||||||
|
|
||||||
PlaylistAppendDialog.onPlaylistFound(fragment.getContext(),
|
PlaylistAppendDialog.onPlaylistFound(fragment.getContext(),
|
||||||
() -> d.show(fragment.getFragmentManager(), "StreamDialogEntry@append_playlist"),
|
() -> d.show(fragment.getParentFragmentManager(), "StreamDialogEntry@append_playlist"),
|
||||||
() -> PlaylistCreationDialog.newInstance(d)
|
() -> PlaylistCreationDialog.newInstance(d)
|
||||||
.show(fragment.getFragmentManager(), "StreamDialogEntry@create_playlist")
|
.show(fragment.getParentFragmentManager(), "StreamDialogEntry@create_playlist")
|
||||||
);
|
);
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
play_with_kodi(R.string.play_with_kodi_title, (fragment, item) -> {
|
play_with_kodi(R.string.play_with_kodi_title, (fragment, item) -> {
|
||||||
|
|
Loading…
Reference in New Issue