Replaced the equals method
This commit is contained in:
parent
52e39c3402
commit
5b3f8a3d30
4 changed files with 20 additions and 21 deletions
|
|
@ -864,7 +864,8 @@ public final class VideoDetailFragment
|
|||
if (playQueue == null) {
|
||||
playQueue = new SinglePlayQueue(result);
|
||||
}
|
||||
if (stack.isEmpty() || !stack.peek().getPlayQueue().equals(playQueue)) {
|
||||
if (stack.isEmpty() || !stack.peek().getPlayQueue()
|
||||
.equalStreams(playQueue)) {
|
||||
stack.push(new StackItem(serviceId, url, title, playQueue));
|
||||
}
|
||||
}
|
||||
|
|
@ -1780,7 +1781,7 @@ public final class VideoDetailFragment
|
|||
// deleted/added items inside Channel/Playlist queue and makes possible to have
|
||||
// a history of played items
|
||||
@Nullable final StackItem stackPeek = stack.peek();
|
||||
if (stackPeek != null && !stackPeek.getPlayQueue().equals(queue)) {
|
||||
if (stackPeek != null && !stackPeek.getPlayQueue().equalStreams(queue)) {
|
||||
@Nullable final PlayQueueItem playQueueItem = queue.getItem();
|
||||
if (playQueueItem != null) {
|
||||
stack.push(new StackItem(playQueueItem.getServiceId(), playQueueItem.getUrl(),
|
||||
|
|
@ -1846,7 +1847,7 @@ public final class VideoDetailFragment
|
|||
// They are not equal when user watches something in popup while browsing in fragment and
|
||||
// then changes screen orientation. In that case the fragment will set itself as
|
||||
// a service listener and will receive initial call to onMetadataUpdate()
|
||||
if (!queue.equals(playQueue)) {
|
||||
if (!queue.equalStreams(playQueue)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2113,7 +2114,7 @@ public final class VideoDetailFragment
|
|||
final Iterator<StackItem> iterator = stack.descendingIterator();
|
||||
while (iterator.hasNext()) {
|
||||
final StackItem next = iterator.next();
|
||||
if (next.getPlayQueue().equals(queue)) {
|
||||
if (next.getPlayQueue().equalStreams(queue)) {
|
||||
item = next;
|
||||
break;
|
||||
}
|
||||
|
|
@ -2128,7 +2129,7 @@ public final class VideoDetailFragment
|
|||
if (isClearingQueueConfirmationRequired(activity)
|
||||
&& playerIsNotStopped()
|
||||
&& activeQueue != null
|
||||
&& !activeQueue.equals(playQueue)) {
|
||||
&& !activeQueue.equalStreams(playQueue)) {
|
||||
showClearingQueueConfirmation(onAllow);
|
||||
} else {
|
||||
onAllow.run();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue