Skip to content

Commit

Permalink
Use identical method names for creating the InfoItemDialog in Fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiGr committed Dec 27, 2021
1 parent e46a9c6 commit dbc7218
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public void selected(final StreamInfoItem selectedItem) {

@Override
public void held(final StreamInfoItem selectedItem) {
showStreamDialog(selectedItem);
showInfoItemDialog(selectedItem);
}
});

Expand Down Expand Up @@ -337,7 +337,7 @@ protected void onScrollToBottom() {
}
}

protected void showStreamDialog(final StreamInfoItem item) {
protected void showInfoItemDialog(final StreamInfoItem item) {
final Context context = getContext();
final Activity activity = getActivity();
if (context == null || context.getResources() == null || activity == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private PlayQueue getPlayQueueStartingAt(final StreamInfoItem infoItem) {
}

@Override
protected void showStreamDialog(final StreamInfoItem item) {
protected void showInfoItemDialog(final StreamInfoItem item) {
final Context context = getContext();
final Activity activity = getActivity();
if (context == null || context.getResources() == null || activity == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ class FeedFragment : BaseStateFragment<FeedState>() {
feedBinding.loadingProgressBar.max = progressState.maxProgress
}

private fun showStreamDialog(item: StreamInfoItem) {
private fun showInfoItemDialog(item: StreamInfoItem) {
val context = context
val activity: Activity? = getActivity()
if (context == null || context.resources == null || activity == null) return
Expand All @@ -373,7 +373,7 @@ class FeedFragment : BaseStateFragment<FeedState>() {

override fun onItemLongClick(item: Item<*>, view: View): Boolean {
if (item is StreamItem && !isRefreshing) {
showStreamDialog(item.streamWithState.stream.toStreamInfoItem())
showInfoItemDialog(item.streamWithState.stream.toStreamInfoItem())
return true
}
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public void selected(final LocalItem selectedItem) {
@Override
public void held(final LocalItem selectedItem) {
if (selectedItem instanceof StreamStatisticsEntry) {
showStreamDialog((StreamStatisticsEntry) selectedItem);
showInfoItemDialog((StreamStatisticsEntry) selectedItem);
}
}
});
Expand Down Expand Up @@ -324,7 +324,7 @@ private PlayQueue getPlayQueueStartingAt(final StreamStatisticsEntry infoItem) {
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 Activity activity = getActivity();
if (context == null || context.getResources() == null || activity == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public void selected(final LocalItem selectedItem) {
@Override
public void held(final LocalItem selectedItem) {
if (selectedItem instanceof PlaylistStreamEntry) {
showStreamItemDialog((PlaylistStreamEntry) selectedItem);
showInfoItemDialog((PlaylistStreamEntry) selectedItem);
}
}

Expand Down Expand Up @@ -739,7 +739,7 @@ private PlayQueue getPlayQueueStartingAt(final PlaylistStreamEntry infoItem) {
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 Activity activity = getActivity();
if (context == null || context.getResources() == null || activity == null) {
Expand Down

0 comments on commit dbc7218

Please sign in to comment.