From d852eb7b06ae96a0a280b998e9fd6aa07cc1dcad Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 8 May 2024 00:44:17 +0700 Subject: [PATCH] simplified lambda expresions --- .../newpipe/fragments/detail/VideoDetailFragment.java | 6 ++---- .../newpipe/fragments/list/playlist/PlaylistFragment.java | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 95b54f65a..0901095b4 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -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); diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index 9afb06344..645b947fc 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -500,7 +500,7 @@ public class PlaylistFragment extends BaseListInfoFragment x.getDuration()) + .mapToLong(StreamInfoItem::getDuration) .sum(); headerBinding.playlistStreamCount.setText( Localization.concatenateStrings(