Review of "Preserve Battery Health" version 9

Details Page Preview

Simple extension that adds a quick setting button to enable or disable battery charge thresholds via D-Bus + UPower (Preserve Battery Health)

Extension Homepage
https://gitlab.com/marcosdalvarez/preserve-battery-health-extension

No comments.

Diff Against

Files

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

Shexli (experimental) warning 2

Shexli found 2 issues that may need reviewer attention.

EGO-L-003 warning

signals connected by extension should be disconnected in disable()

Signals assigned in `enable()` are missing matching disconnect calls in `disable()` or its helper methods.

Disconnect all signals

  • extension.js:100
                this._settingsHandlerId = this._settings.connect(
                    `changed::${SHOW_INDICATOR_KEY}`, () => { this._sync(); }
                )
  • extension.js:202
                                device.connect('g-properties-changed',
                                    (_proxy, changed, _invalidated) => {
                                        const properties = changed.deepUnpack();
                                        if ('ChargeThresholdEnabled' in properties) {
         

EGO-M-008 warning

extensions using unlock-dialog must document it in disable() comments

Extensions using `unlock-dialog` should document the reason in `disable()` comments.

Session Modes

  • extension.js:240
        disable() {
            this._indicator.quickSettingsItems.forEach(item => item.destroy());
            this._indicator.destroy();
            this._indicator = null;
        }

All Versions

Version Status
10 Unreviewed
9 Rejected
8 Active
7 Active
6 Active
5 Active
4 Active
3 Active
2 Active
1 Active

Previous Reviews on this Version

GdH posted a review
Adding session modes must follow strict rules: https://gjs.guide/extensions/review-guidelines/review-guidelines.html#session-modes
GdH rejected