Review of "Restore Geometry" version 2

Details Page Preview

An extension to automatically restore its previous geometry of window upon its opening

Extension Homepage
https://github.com/upsuper/gnome-extension-restore-geometry

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

All Versions

Version Status
5 Active
4 Rejected
3 Active
2 Active
1 Rejected

Previous Reviews on this Version

JustPerfection active
Approved but #2 from previous review hasn't been addressed here. You can also add `donations` to the `metadata.json`, so people can donate to you if they want: [Extension Anatomy: donations](https://gjs.guide/extensions/overview/anatomy.html#donations)
upsuper posted a review
Thanks for your review. I think the slightly defensive style is okay. If the extension is never double enabled, then it is basically a no-op, but if there is any bug that causing it to double enable, then it defends it from having problematic behavior.
JustPerfection posted a review
You don't need that. It's unnecessary. If any racy situation happens, you just simply replacing it with line 231. For racy disable just simply do: ```js this._impl?.destroy(); this._impl = null; ```
upsuper posted a review
For racy disable, you are right, the `if` statement can be simplified to just a `?.` But for racy enable, line 231 alone is not enough. If we remove that part, the original impl object would still continue to be hanging around, and all the signals it connects to would still be alive, so we do need to destroy the old impl object first. It could be just a `?.` as well, though.