loginManager: Return objects instead of multiple booleans
Multiple booleans - both in arguments and return values - are almost always problematic API, because people have to memorize (or more likely look up) the meaning of each position. Instead, return a JS object so each value has a name attached to it. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2370>
This commit is contained in:
@ -351,7 +351,7 @@ const SystemActions = GObject.registerClass({
|
||||
}
|
||||
|
||||
async _updateHaveSuspend() {
|
||||
const [canSuspend, needsAuth] = await this._loginManager.canSuspend();
|
||||
const {canSuspend, needsAuth} = await this._loginManager.canSuspend();
|
||||
this._canHaveSuspend = canSuspend;
|
||||
this._suspendNeedsAuth = needsAuth;
|
||||
this._updateSuspend();
|
||||
|
Reference in New Issue
Block a user