[gnome-weather/gnome-3-32] Revert "shared/world.js: don't use detached location from settings"



commit 9f7c0ff433117205c623a9c56915d6b39c2f18a6
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Fri Apr 3 13:19:00 2020 -0500

    Revert "shared/world.js: don't use detached location from settings"
    
    This reverts commit 01bf03ab8cf805a5a2706a03c5615b42c020e41f.

 src/shared/world.js | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/shared/world.js b/src/shared/world.js
index 1c7d8c6..07feade 100644
--- a/src/shared/world.js
+++ b/src/shared/world.js
@@ -103,15 +103,9 @@ var WorldModel = GObject.registerClass({
         let info = null;
         for (let i = locations.length - 1; i >= 0; i--) {
             let variant = locations[i];
-            let world = this._world.deserialize(variant);
-            if (world != null) {
-                let coords = world.get_coords();
-                let location = this._world.find_nearest_city(coords[0], coords[1]);
-
-                info = this._addLocationInternal(location, false);
-            } else {
-                log('Failed to deserialize location from GVariant:' + variant.print(true));
-            }
+            let location = this._world.deserialize(variant);
+
+            info = this._addLocationInternal(location, false);
         }
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]