From a00690cd5c41aafb0cdfb6d98fb3173ffd86b861 Mon Sep 17 00:00:00 2001 From: Brendan William Date: Wed, 9 Aug 2023 10:40:35 -0700 Subject: [PATCH] weather: Prevent setting Geoclue source as location name Prior to Geoclue v2.7, the location description did not seem to ever be set. Now, the source used to determine the location is set as the description. This can result in the location name in dateMenu to be set as "WiFi", "GeoIP", etc., since we relay the description as the location name to GWeather. Instead, pass an empty string so GWeather continues to set the location name itself. Part-of: (cherry picked from commit ae86b58d59bb80e6d104debae7c34a890563c321) --- js/misc/weather.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/misc/weather.js b/js/misc/weather.js index a01b832b8..2aa340ab7 100644 --- a/js/misc/weather.js +++ b/js/misc/weather.js @@ -267,10 +267,11 @@ var WeatherClient = class extends Signals.EventEmitter { _onGClueLocationChanged() { let geoLocation = this._gclueService.location; - let location = GWeather.Location.new_detached(geoLocation.description, - null, - geoLocation.latitude, - geoLocation.longitude); + // Provide empty name so GWeather sets location name + const location = GWeather.Location.new_detached('', + null, + geoLocation.latitude, + geoLocation.longitude); this._setLocation(location); }