mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
weather: Handle missing permission store
Our weather integration is supposed to follow GNOME Weather's settings, including its permission to use location services. However there's a discrepancy in case xdg-desktop-portal is unavailable: While our geoclue agent grants all applications access to location services in that case, the weather integration treats it as if access was denied. Fix this by handling this case explicitly. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1130
This commit is contained in:
parent
f81ac498fb
commit
fea0192772
1 changed files with 8 additions and 0 deletions
|
|
@ -30,6 +30,14 @@ var WeatherClient = class {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this._permStore.g_name_owner == null) {
|
||||||
|
// Failed to auto-start, likely because xdg-desktop-portal
|
||||||
|
// isn't installed; don't restrict access to location service
|
||||||
|
this._weatherAuthorized = true;
|
||||||
|
this._updateAutoLocation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this._permStore.LookupRemote('gnome', 'geolocation', (res, error) => {
|
this._permStore.LookupRemote('gnome', 'geolocation', (res, error) => {
|
||||||
if (error)
|
if (error)
|
||||||
log('Error looking up permission: ' + error.message);
|
log('Error looking up permission: ' + error.message);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue