simplified lambda expresions

This commit is contained in:
Alex 2024-05-08 00:44:17 +07:00
parent 66cf5ff6f8
commit d852eb7b06
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())
.onErrorComplete()
.observeOn(AndroidSchedulers.mainThread())
.subscribe(state -> {
updatePlaybackProgress(
state.getProgressMillis(), info.getDuration() * 1000);
}, e -> {
.subscribe(state -> updatePlaybackProgress(
state.getProgressMillis(), info.getDuration() * 1000), e -> {
// impossible since the onErrorComplete()
}, () -> {
binding.positionView.setVisibility(View.GONE);

View File

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