← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~vthompson/ubuntu-weather-app/reboot-start-add-location into lp:ubuntu-weather-app/reboot

 

Victor Thompson has proposed merging lp:~vthompson/ubuntu-weather-app/reboot-start-add-location into lp:ubuntu-weather-app/reboot.

Commit message:
Start in AddLocationPage when there are no locations available.

Requested reviews:
  Ubuntu Weather Developers (ubuntu-weather-dev)

For more details, see:
https://code.launchpad.net/~vthompson/ubuntu-weather-app/reboot-start-add-location/+merge/258685

Start in AddLocationPage when there are no locations available. Location detection still needs to be added and taken into account, but when 1) location can not be determined and 2) the user has no defined locations, Design has stated that rather than create an empty state, guiding the user to adding a location is preferred.
-- 
Your team Ubuntu Weather Developers is requested to review the proposed merge of lp:~vthompson/ubuntu-weather-app/reboot-start-add-location into lp:ubuntu-weather-app/reboot.
=== modified file 'app/ubuntu-weather-app.qml'
--- app/ubuntu-weather-app.qml	2015-04-27 22:43:34 +0000
+++ app/ubuntu-weather-app.qml	2015-05-08 19:46:59 +0000
@@ -65,6 +65,14 @@
     Component.onCompleted: {
         storage.getLocations(fillPages);
         refreshData();
+
+        /*
+          TODO: Also add a check to determine if current location can be
+                resolved.
+        */
+        if (locationsList.length == 0) {
+            mainPageStack.push(Qt.resolvedUrl("ui/AddLocationPage.qml"));
+        }
     }
 
     /*


Follow ups