• Max Kellermann's avatar
    queue/PlaylistControl: keep order list consistency in MoveOrderToCurrent() · 91254e92
    Max Kellermann authored
    Our previous use of Queue::SwapOrders() could cause surprising
    results:
    
    - sometimes, the old "current" song would be played again (if the
      newly selected song had not been played already)
    
    - sometimes, the old "current" song would not be played again (if the
      newly selected song had already been played)
    
    This is inconsistent, because it should not depend on whether the
    newly selected song had already been played.
    
    So instead of Queue::SwapOrders() we now use Queue::MoveOrderAfter()
    and Queue::MoveOrderBefore(), which is more expensive, but also more
    consistent.  It attempts to retain as much from the previous order
    list as possible, and only moves the newly selected song around.
    91254e92
To find the state of this project's repository at the time of any of these versions, check out the tags.
NEWS 62.1 KB