dbusServices/extensions: Check earlier for existing dialog
There is no point in making a D-Bus call if we are going to bail out anyway. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2832>
This commit is contained in:
parent
3451c5a182
commit
b4c2901e47
@ -114,11 +114,10 @@ export const ExtensionsService = class extends ServiceImplementation {
|
||||
const [uuid, parentWindow, options] = params;
|
||||
|
||||
try {
|
||||
const [serialized] = await this._proxy.GetExtensionInfoAsync(uuid);
|
||||
|
||||
if (this._prefsDialog)
|
||||
throw new Error('Already showing a prefs dialog');
|
||||
|
||||
const [serialized] = await this._proxy.GetExtensionInfoAsync(uuid);
|
||||
const extension = ExtensionUtils.deserializeExtension(serialized);
|
||||
|
||||
this._prefsDialog = new ExtensionPrefsDialog(extension);
|
||||
|
Loading…
x
Reference in New Issue
Block a user