-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: fix a bug where move updates could go missing between windows
If a room moved from one window range to another window range, and the index of the destination was the leading edge of a different window, this would trip up the code into thinking it was a no-op move and hence not issue a DELETE/INSERT for the 2nd window, even though it was in fact needed. For example: ``` w1 w2 [0,1,2] 3,4,5 [6,7,8] Move 1 to 6 turns the list into: [0,2,3] 4,5,6 [1,7,8] which should be the operations: DELETE 1, INSERT 2 (val=3) DELETE 6, INSERT 6 (val=1) but because DELETE/INSERT both have the same index value, and the target room is the updated room, we thought this was the same as when you have: [0,1,2] 3,4,5 Move 0 to 0 which should no-op. ``` Fixed by ensuring that we also check that there is only 1 move operation. If there are >1 move operations then we are moving between lists and should include the DELETE/INSERT operation with the same index. This could manifest itself in updated rooms spontaneously disappearing and/or neighbouring rooms being duplicated.
- Loading branch information
Showing
2 changed files
with
46 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters