ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #02788
[Merge] lp:~vthompson/ubuntu-weather-app/reboot-empty-state into lp:ubuntu-weather-app/reboot
Victor Thompson has proposed merging lp:~vthompson/ubuntu-weather-app/reboot-empty-state into lp:ubuntu-weather-app/reboot.
Commit message:
Initial empty state
Requested reviews:
Ubuntu Weather Developers (ubuntu-weather-dev)
For more details, see:
https://code.launchpad.net/~vthompson/ubuntu-weather-app/reboot-empty-state/+merge/261916
This mp introduces a simple 5 second timer and label that is displayed to the user while the Location is being determined.
--
Your team Ubuntu Weather Developers is requested to review the proposed merge of lp:~vthompson/ubuntu-weather-app/reboot-empty-state into lp:ubuntu-weather-app/reboot.
=== modified file 'app/ubuntu-weather-app.qml'
--- app/ubuntu-weather-app.qml 2015-06-05 01:02:17 +0000
+++ app/ubuntu-weather-app.qml 2015-06-14 21:46:36 +0000
@@ -65,14 +65,6 @@
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"));
- }
}
/*
@@ -161,7 +153,30 @@
units = metric ? "metric" : "imperial"
windUnits = metric ? "kph" : "mph"
}
- }
+
+ if (locationsList == null || locationsList.length == 0) {
+ getCurrentLocationTimer.start()
+ }
+ }
+ }
+
+ Timer {
+ id: getCurrentLocationTimer
+ interval: 5000
+
+ onTriggered: {
+ if (locationsList.length == 0) {
+ mainPageStack.push(Qt.resolvedUrl("ui/AddLocationPage.qml"));
+ }
+ }
+ }
+
+ Label {
+ id: emptyStateLabel
+ anchors.centerIn: parent
+ text: i18n.tr("Searching for current location...")
+ visible: (locationsList == null || locationsList.length == 0) && mainPageStack.depth == 1
+ z: 1000
}
Data.Storage {
=== modified file 'po/com.ubuntu.weather.pot'
--- po/com.ubuntu.weather.pot 2015-06-05 23:11:51 +0000
+++ po/com.ubuntu.weather.pot 2015-06-14 21:46:36 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: ubuntu-weather-app\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-06-05 18:04-0500\n"
+"POT-Creation-Date: 2015-06-14 16:44-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -66,6 +66,10 @@
msgid "Cancel selection"
msgstr ""
+#: ../app/ubuntu-weather-app.qml:177
+msgid "Searching for current location..."
+msgstr ""
+
#: ../app/ui/AddLocationPage.qml:30
msgid "Select a city"
msgstr ""
Follow ups