mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-22 02:53:09 +01:00
simplified lambda expresions
This commit is contained in:
parent
66cf5ff6f8
commit
d852eb7b06
@ -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);
|
||||||
|
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user