Review of "Bluetooth Quick Connect" version 28

Details Page Preview

This extension allows paired Bluetooth devices to be connected and disconnected via the GNOME system menu, Shows battery status and more.

Extension Homepage
https://github.com/Extensions-Valhalla/gnome-bluetooth-quick-connect

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

Previous Reviews on this Version

JustPerfection rejected
You cannot create objects in global scope (line 25 extension.js). What legacy means in your code? GNOME 3.x?
bjarosze posted a review
Legacy means previous gnome-bluetooth API. Some linux distributions (like Ubuntu 22.04) uses Gnome 42, but old gnome-bluetooth API. Others (like Fedora 36) also uses Gnome 42, but new gnome-bluetooth API. So I cannot check Gnome version. Instead of that I check if new methods are defined in GnomeBluetooth.Client(). Do you have suggestion how I could achieve that differently?
bjarosze posted a review
Is checking GnomeBluetooth.Client.prototype.get_devices === undefined ok? Object will not be created.
JustPerfection posted a review
Yes that's ok because no object will be created. If you want to create objects: ```js function getBluetooth() { if (new GnomeBluetooth.Client().get_devices === undefined) { return Me.imports.bluetooth_legacy; } return Me.imports.bluetooth; } ``` Now you can do this in line 40: ```js this._controller = new getBluetooth().BluetoothController(); ```