1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-22 16:10:31 +00:00

Better naming

This commit is contained in:
litetex 2022-04-02 15:44:06 +02:00
parent 79540a8b9c
commit 6b1a6d264b

View File

@ -47,7 +47,7 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
* has no audio ({@link VideoStream#isVideoOnly()} returns true) and has no secondary stream
* associated with it.
*/
private final boolean hasVideoOnlyWithNoSecondaryStream;
private final boolean hasAnyVideoOnlyStreamWithNoSecondaryStream;
public StreamItemAdapter(final Context context, final StreamSizeWrapper<T> streamsWrapper,
final SparseArray<SecondaryStreamHelper<U>> secondaryStreams) {
@ -55,7 +55,8 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
this.streamsWrapper = streamsWrapper;
this.secondaryStreams = secondaryStreams;
this.hasVideoOnlyWithNoSecondaryStream = checkHasVideoOnlyWithNoSecondaryStream();
this.hasAnyVideoOnlyStreamWithNoSecondaryStream =
checkHasAnyVideoOnlyStreamWithNoSecondaryStream();
}
public StreamItemAdapter(final Context context, final StreamSizeWrapper<T> streamsWrapper) {
@ -119,7 +120,7 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
final VideoStream videoStream = ((VideoStream) stream);
qualityString = videoStream.getResolution();
if (hasVideoOnlyWithNoSecondaryStream) {
if (hasAnyVideoOnlyStreamWithNoSecondaryStream) {
if (videoStream.isVideoOnly()) {
woSoundIconVisibility = hasSecondaryStream(position)
// It has a secondary stream associated with it, so check if it's a
@ -186,9 +187,9 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
/**
* @return if there are any video-only streams with no secondary stream associated with them.
* @see #hasVideoOnlyWithNoSecondaryStream
* @see #hasAnyVideoOnlyStreamWithNoSecondaryStream
*/
private boolean checkHasVideoOnlyWithNoSecondaryStream() {
private boolean checkHasAnyVideoOnlyStreamWithNoSecondaryStream() {
for (int i = 0; i < streamsWrapper.getStreamsList().size(); i++) {
final T stream = streamsWrapper.getStreamsList().get(i);
if (stream instanceof VideoStream) {