LISTEN-moe / desktop-app

Official LISTEN.moe Desktop Client
https://listen.moe/apps
91 stars 8 forks source link

Prevent negative Y rebound from causing a syntax error #14

Closed robflop closed 4 years ago

robflop commented 4 years ago

This PR fixes the behavior described in #11.

The Y-Coordinate of the window is now always set to 0 if negative, and only then saved to the settings file.

Additionally, I added a comment explaining the behavior as I imagine it's not immediately clear why this is being done if not aware of the reasoning already.

I am still unsure why the automatic window rebound causes the duplication of ]} at the end of the settings json, but if the coordinate is manually set to 0 this behavior does not occur anymore.