mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 10:23:33 +00:00
style: lambda to explicit
This commit is contained in:
parent
76c53bd502
commit
aee791b0c3
3 changed files with 36 additions and 19 deletions
|
|
@ -12,6 +12,7 @@ import com.cappielloantonio.tempo.R;
|
|||
import com.cappielloantonio.tempo.databinding.ItemPlayerQueueSongBinding;
|
||||
import com.cappielloantonio.tempo.glide.CustomGlideRequest;
|
||||
import com.cappielloantonio.tempo.interfaces.ClickCallback;
|
||||
import com.cappielloantonio.tempo.interfaces.MediaIndexCallback;
|
||||
import com.cappielloantonio.tempo.service.MediaManager;
|
||||
import com.cappielloantonio.tempo.subsonic.models.Child;
|
||||
import com.cappielloantonio.tempo.util.Constants;
|
||||
|
|
@ -52,13 +53,16 @@ public class PlayerSongQueueAdapter extends RecyclerView.Adapter<PlayerSongQueue
|
|||
.build()
|
||||
.into(holder.item.queueSongCoverImageView);
|
||||
|
||||
MediaManager.getCurrentIndex(mediaBrowserListenableFuture, index -> {
|
||||
if (position < index) {
|
||||
holder.item.queueSongTitleTextView.setAlpha(0.2f);
|
||||
holder.item.queueSongSubtitleTextView.setAlpha(0.2f);
|
||||
} else {
|
||||
holder.item.queueSongTitleTextView.setAlpha(1.0f);
|
||||
holder.item.queueSongSubtitleTextView.setAlpha(1.0f);
|
||||
MediaManager.getCurrentIndex(mediaBrowserListenableFuture, new MediaIndexCallback() {
|
||||
@Override
|
||||
public void onRecovery(int index) {
|
||||
if (position < index) {
|
||||
holder.item.queueSongTitleTextView.setAlpha(0.2f);
|
||||
holder.item.queueSongSubtitleTextView.setAlpha(0.2f);
|
||||
} else {
|
||||
holder.item.queueSongTitleTextView.setAlpha(1.0f);
|
||||
holder.item.queueSongSubtitleTextView.setAlpha(1.0f);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,12 @@ public class HomeTabRadioFragment extends Fragment implements ClickCallback, Rad
|
|||
|
||||
@Override
|
||||
public void onInternetRadioStationLongClick(Bundle bundle) {
|
||||
RadioEditorDialog dialog = new RadioEditorDialog(() -> radioViewModel.getInternetRadioStations(getViewLifecycleOwner()));
|
||||
RadioEditorDialog dialog = new RadioEditorDialog(new RadioCallback() {
|
||||
@Override
|
||||
public void onDismiss() {
|
||||
radioViewModel.getInternetRadioStations(getViewLifecycleOwner());
|
||||
}
|
||||
});
|
||||
dialog.setArguments(bundle);
|
||||
dialog.show(activity.getSupportFragmentManager(), null);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue