js: Use async D-Bus wrappers
After porting the more complex cases - in particular those that affect a module's API - we are left with straight-forward D-Bus method calls that can be moved to promise-based wrappers in one go. For consistency, this also switches from Remote to Async where the call result is ignored. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2344>
This commit is contained in:

committed by
Marge Bot

parent
a3db909383
commit
637ee7386e
@ -51,12 +51,12 @@ var AutomountManager = class {
|
||||
}
|
||||
}
|
||||
|
||||
_InhibitorsChanged(_object, _senderName, [_inhibitor]) {
|
||||
this._session.IsInhibitedRemote(GNOME_SESSION_AUTOMOUNT_INHIBIT,
|
||||
(result, error) => {
|
||||
if (!error)
|
||||
this._inhibited = result[0];
|
||||
});
|
||||
async _InhibitorsChanged(_object, _senderName, [_inhibitor]) {
|
||||
try {
|
||||
const [inhibited] =
|
||||
await this._session.IsInhibitedAsync(GNOME_SESSION_AUTOMOUNT_INHIBIT);
|
||||
this._inhibited = inhibited;
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
_startupMountAll() {
|
||||
|
Reference in New Issue
Block a user