mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
js: Promisify async operations
Promises make asynchronous operations easier to manage, in particular when used through the async/await syntax that allows for asynchronous code to closely resemble synchronous one. gjs has included a Gio._promisify() helper for a while now, which monkey-patches methods that follow GIO's async pattern to return a Promise when called without a callback argument. Use that to get rid of all those GAsyncReadyCallbacks! https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1126
This commit is contained in:
parent
18742fcc32
commit
764527c8c9
20 changed files with 409 additions and 428 deletions
|
|
@ -204,7 +204,7 @@ var RemoteSearchProvider = class {
|
|||
g_interface_info: proxyInfo,
|
||||
g_interface_name: proxyInfo.name,
|
||||
gFlags });
|
||||
this.proxy.init_async(GLib.PRIORITY_DEFAULT, null, null);
|
||||
this.proxy.init_async(GLib.PRIORITY_DEFAULT, null);
|
||||
|
||||
this.appInfo = appInfo;
|
||||
this.id = appInfo.get_id();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue