mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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:
parent
928f3288e9
commit
5442266f28
14 changed files with 41 additions and 62 deletions
|
|
@ -7,7 +7,7 @@ const PermissionStore = imports.misc.permissionStore;
|
|||
|
||||
const { loadInterfaceXML } = imports.misc.fileUtils;
|
||||
|
||||
Gio._promisify(Geoclue.Simple, 'new', 'new_finish');
|
||||
Gio._promisify(Geoclue.Simple, 'new');
|
||||
|
||||
const WeatherIntegrationIface = loadInterfaceXML('org.gnome.Shell.WeatherIntegration');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue