Open CryZe opened 4 years ago
We should probably fix this too in the process of fixing this issue: https://github.com/LiveSplit/LiveSplitOne/blob/04aef1e872c0e543d1a267d9f2c3a5b2a53b4f28/src/ui/RunEditor.tsx#L1886
Another issue is that downloading splits from the leaderboard doesn't prompt you about unsaved changes.
If you download splits from the leaderboard in the Run Editor, it'll override the run that is getting modified by the run editor. However if you save that, there's two possible suboptimal behaviors:
If you edited the splits that you had open in your timer, it'll correctly replace the splits in the timer. However it will not reset your splits key. So the splits will still be associated to your splits and those will be overridden once you save. The downloaded splits should be regarded as fresh splits (splits key == undefined).
If you edit splits in your database and exit the run editor with the downloaded splits, then the splits in the database will be overridden, which you likely didn't intend to do. We should create a new entry in the database.