simplified lambda expresions

This commit is contained in:
Alex 2024-05-08 00:44:17 +07:00
parent 8ac87daae4
commit 86f1cf2584
No known key found for this signature in database
GPG Key ID: C9ABDE12115262C4
2 changed files with 3 additions and 5 deletions

View File

@ -1685,10 +1685,8 @@ public final class VideoDetailFragment
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.onErrorComplete() .onErrorComplete()
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(state -> { .subscribe(state -> updatePlaybackProgress(
updatePlaybackProgress( state.getProgressMillis(), info.getDuration() * 1000), e -> {
state.getProgressMillis(), info.getDuration() * 1000);
}, e -> {
// impossible since the onErrorComplete() // impossible since the onErrorComplete()
}, () -> { }, () -> {
binding.positionView.setVisibility(View.GONE); binding.positionView.setVisibility(View.GONE);

View File

@ -500,7 +500,7 @@ public class PlaylistFragment extends BaseListInfoFragment<StreamInfoItem, Playl
final boolean isDurationComplete) { final boolean isDurationComplete) {
if (activity != null && headerBinding != null) { if (activity != null && headerBinding != null) {
playlistOverallDurationSeconds += list.stream() playlistOverallDurationSeconds += list.stream()
.mapToLong(x -> x.getDuration()) .mapToLong(StreamInfoItem::getDuration)
.sum(); .sum();
headerBinding.playlistStreamCount.setText( headerBinding.playlistStreamCount.setText(
Localization.concatenateStrings( Localization.concatenateStrings(