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:
@ -305,7 +305,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
}
|
||||
|
||||
async _getCanRebootToBootLoaderMenu() {
|
||||
const [canRebootToBootLoaderMenu] = await this._loginManager.canRebootToBootLoaderMenu();
|
||||
const {canRebootToBootLoaderMenu} = await this._loginManager.canRebootToBootLoaderMenu();
|
||||
this._canRebootToBootLoaderMenu = canRebootToBootLoaderMenu;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user