js: Simplify promisify() calls
If the finish function isn't specified, promisify will now try to use the async name without '_async'/'_begin' suffix (if any) and '_finish' appended. Everything except IBus uses a variation of that pattern, so there's quite a bit of boilerplate we get to remove… Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2174>
This commit is contained in:

committed by
Marge Bot

parent
928f3288e9
commit
5442266f28
@ -18,14 +18,11 @@ const FprintManagerProxy = Gio.DBusProxy.makeProxyWrapper(FprintManagerIface);
|
||||
const FprintDeviceIface = loadInterfaceXML('net.reactivated.Fprint.Device');
|
||||
const FprintDeviceProxy = Gio.DBusProxy.makeProxyWrapper(FprintDeviceIface);
|
||||
|
||||
Gio._promisify(Gdm.Client.prototype,
|
||||
'open_reauthentication_channel', 'open_reauthentication_channel_finish');
|
||||
Gio._promisify(Gdm.Client.prototype,
|
||||
'get_user_verifier', 'get_user_verifier_finish');
|
||||
Gio._promisify(Gdm.Client.prototype, 'open_reauthentication_channel');
|
||||
Gio._promisify(Gdm.Client.prototype, 'get_user_verifier');
|
||||
Gio._promisify(Gdm.UserVerifierProxy.prototype,
|
||||
'call_begin_verification_for_user', 'call_begin_verification_for_user_finish');
|
||||
Gio._promisify(Gdm.UserVerifierProxy.prototype,
|
||||
'call_begin_verification', 'call_begin_verification_finish');
|
||||
'call_begin_verification_for_user');
|
||||
Gio._promisify(Gdm.UserVerifierProxy.prototype, 'call_begin_verification');
|
||||
|
||||
var PASSWORD_SERVICE_NAME = 'gdm-password';
|
||||
var FINGERPRINT_SERVICE_NAME = 'gdm-fingerprint';
|
||||
|
Reference in New Issue
Block a user