Commit 3bc3900d by bachinger Committed by Oliver Woodman

Do not update queue when the queue did not actually change to avoid

unnecessary updates are broadcasted to all clients.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162728670
parent 89181cf4
...@@ -93,7 +93,12 @@ public abstract class TimelineQueueNavigator implements MediaSessionConnector.Qu ...@@ -93,7 +93,12 @@ public abstract class TimelineQueueNavigator implements MediaSessionConnector.Qu
@Override @Override
public void onCurrentWindowIndexChanged(Player player) { public void onCurrentWindowIndexChanged(Player player) {
publishFloatingQueueWindow(player); if (activeQueueItemId == MediaSessionCompat.QueueItem.UNKNOWN_ID
|| player.getCurrentTimeline().getWindowCount() > maxQueueSize) {
publishFloatingQueueWindow(player);
} else if (!player.getCurrentTimeline().isEmpty()) {
activeQueueItemId = player.getCurrentWindowIndex();
}
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment