Use identical method names for creating the InfoItemDialog in Fragments

This commit is contained in:
TobiGr 2021-12-27 16:14:26 +01:00
parent ef0d562702
commit 646d8f431c
5 changed files with 9 additions and 9 deletions

View File

@ -261,7 +261,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I>
@Override @Override
public void held(final StreamInfoItem selectedItem) { public void held(final StreamInfoItem selectedItem) {
showStreamDialog(selectedItem); showInfoItemDialog(selectedItem);
} }
}); });
@ -402,7 +402,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I>
} }
} }
protected void showStreamDialog(final StreamInfoItem item) { protected void showInfoItemDialog(final StreamInfoItem item) {
final Context context = getContext(); final Context context = getContext();
final Activity activity = getActivity(); final Activity activity = getActivity();
if (context == null || context.getResources() == null || activity == null) { if (context == null || context.getResources() == null || activity == null) {

View File

@ -135,7 +135,7 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
} }
@Override @Override
protected void showStreamDialog(final StreamInfoItem item) { protected void showInfoItemDialog(final StreamInfoItem item) {
final Context context = getContext(); final Context context = getContext();
final Activity activity = getActivity(); final Activity activity = getActivity();
if (context == null || context.getResources() == null || activity == null) { if (context == null || context.getResources() == null || activity == null) {

View File

@ -352,7 +352,7 @@ class FeedFragment : BaseStateFragment<FeedState>() {
feedBinding.loadingProgressBar.max = progressState.maxProgress feedBinding.loadingProgressBar.max = progressState.maxProgress
} }
private fun showStreamDialog(item: StreamInfoItem) { private fun showInfoItemDialog(item: StreamInfoItem) {
val context = context val context = context
val activity: Activity? = getActivity() val activity: Activity? = getActivity()
if (context == null || context.resources == null || activity == null) return if (context == null || context.resources == null || activity == null) return
@ -373,7 +373,7 @@ class FeedFragment : BaseStateFragment<FeedState>() {
override fun onItemLongClick(item: Item<*>, view: View): Boolean { override fun onItemLongClick(item: Item<*>, view: View): Boolean {
if (item is StreamItem && !isRefreshing) { if (item is StreamItem && !isRefreshing) {
showStreamDialog(item.streamWithState.stream.toStreamInfoItem()) showInfoItemDialog(item.streamWithState.stream.toStreamInfoItem())
return true return true
} }
return false return false

View File

@ -150,7 +150,7 @@ public class StatisticsPlaylistFragment
@Override @Override
public void held(final LocalItem selectedItem) { public void held(final LocalItem selectedItem) {
if (selectedItem instanceof StreamStatisticsEntry) { if (selectedItem instanceof StreamStatisticsEntry) {
showStreamDialog((StreamStatisticsEntry) selectedItem); showInfoItemDialog((StreamStatisticsEntry) selectedItem);
} }
} }
}); });
@ -324,7 +324,7 @@ public class StatisticsPlaylistFragment
return getPlayQueue(Math.max(itemListAdapter.getItemsList().indexOf(infoItem), 0)); return getPlayQueue(Math.max(itemListAdapter.getItemsList().indexOf(infoItem), 0));
} }
private void showStreamDialog(final StreamStatisticsEntry item) { private void showInfoItemDialog(final StreamStatisticsEntry item) {
final Context context = getContext(); final Context context = getContext();
final Activity activity = getActivity(); final Activity activity = getActivity();
if (context == null || context.getResources() == null || activity == null) { if (context == null || context.getResources() == null || activity == null) {

View File

@ -178,7 +178,7 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
@Override @Override
public void held(final LocalItem selectedItem) { public void held(final LocalItem selectedItem) {
if (selectedItem instanceof PlaylistStreamEntry) { if (selectedItem instanceof PlaylistStreamEntry) {
showStreamItemDialog((PlaylistStreamEntry) selectedItem); showInfoItemDialog((PlaylistStreamEntry) selectedItem);
} }
} }
@ -739,7 +739,7 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
return getPlayQueue(Math.max(itemListAdapter.getItemsList().indexOf(infoItem), 0)); return getPlayQueue(Math.max(itemListAdapter.getItemsList().indexOf(infoItem), 0));
} }
protected void showStreamItemDialog(final PlaylistStreamEntry item) { protected void showInfoItemDialog(final PlaylistStreamEntry item) {
final Context context = getContext(); final Context context = getContext();
final Activity activity = getActivity(); final Activity activity = getActivity();
if (context == null || context.getResources() == null || activity == null) { if (context == null || context.getResources() == null || activity == null) {