Review of "Battery indicator (upower)" version 8

Details Page Preview

Display battery level indicators as reported by upower

Extension Homepage
https://github.com/malko/battery-indicator-upower

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
9 Active
8 Rejected
7 Active
6 Active
5 Active
4 Active
3 Rejected
2 Active
1 Inactive

Previous Reviews on this Version

malko posted a review
JustPerfection rejected
1. Also null out in disable: ```js settingsManager = null; ``` [EGO Review Guidelines: Destroy](https://gjs.guide/extensions/review-guidelines/review-guidelines.html#destroy-all-objects) 2. You cannot create instance of objects in the global scope (line 109 `utils/SettingsManager.js`): - [EGO Review Guidelines: Initialization](https://gjs.guide/extensions/review-guidelines/review-guidelines.html#only-use-initialization-for-static-resources) - [EGO Review Guidelines: Destroy](https://gjs.guide/extensions/review-guidelines/review-guidelines.html#destroy-all-objects) 3. `lookupByUUID()` is a bad practice (line 31 `utils/SettingsManager.js`). You can send `this` from the entry point to the class needing it when it's possible (dependency injection). 4. Please remove line 304-306 `extension.js`. Not needed. 5. Please remove the timeout in the same class (line 298 `extension.js`). To do that, use this inside `indicator` use: ```js destroy() { if (this._refreshTimeout) { clearTimeout(this._refreshTimeout); } super.destroy(); } `` 6. Please use a less generic name for the default class you are exporting (line 40 `prefs.js`).