Better equals check
It ensures that queues are not the same. Without this check when you have multiple videos in the backstack and navigating back via Back button you'll get duplicated videos
This commit is contained in:
parent
68abbfc19c
commit
05e7a25ad8
1 changed files with 10 additions and 1 deletions
|
|
@ -528,7 +528,16 @@ public abstract class PlayQueue implements Serializable {
|
|||
return false;
|
||||
}
|
||||
final PlayQueue other = (PlayQueue) obj;
|
||||
return streams.equals(other.streams);
|
||||
if (size() != other.size()) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < size(); i++) {
|
||||
// Check is based on URL
|
||||
if (!streams.get(i).getUrl().equals(other.streams.get(i).getUrl())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue