1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-06-26 07:03:20 +00:00

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:
Avently 2022-02-19 22:12:31 +03:00
parent af80d96b9e
commit 835c5e9d43

View File

@ -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