[gnome-weather/mcatanzaro/#90: 1/2] Revert "shared/world.js: don't use detached location from settings"



commit 49e6a52a143bfcf1dc7da87f356dd07db6a5ce1e
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Tue Mar 24 13:57:58 2020 -0500

    Revert "shared/world.js: don't use detached location from settings"
    
    This reverts commit 01bf03ab8cf805a5a2706a03c5615b42c020e41f.
    
    This badly broke location saving. Fixes #90

 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]