Skip to content

Commit 7d3f9d0

Browse files
committed
Simplify stream state loading in ChannelTabFragment
1 parent 282a8c1 commit 7d3f9d0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelTabFragment.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,8 @@ private boolean shouldIncludeItem(final InfoItem item,
219219
}
220220
final StreamInfoItem streamItem = (StreamInfoItem) item;
221221
try {
222-
final StreamStateEntity[] result =
223-
historyRecordManager.loadStreamState(streamItem).blockingGet();
224222
final StreamStateEntity state =
225-
(result != null && result.length > 0) ? result[0] : null;
223+
historyRecordManager.loadStreamState(streamItem).blockingGet();
226224
if (state != null) {
227225
final long duration = streamItem.getDuration();
228226
final boolean isFinished = state.isFinished(duration);

0 commit comments

Comments
 (0)