← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~vthompson/ubuntu-weather-app/reboot-get-initial-data-from-storage into lp:ubuntu-weather-app/reboot

 

Victor Thompson has proposed merging lp:~vthompson/ubuntu-weather-app/reboot-get-initial-data-from-storage into lp:ubuntu-weather-app/reboot.

Commit message:
Get initial data from storage to not block the UI thread.

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

For more details, see:
https://code.launchpad.net/~vthompson/ubuntu-weather-app/reboot-get-initial-data-from-storage/+merge/252962

Nik had noticed that the app is blank when it is started. I'm 99% sure that is due to the initial refresh blocking the UI. I had the same issue with both OWM and TWC today. Ideally this should be done in a workerscript, but the solution here is a good temporary workaround.
-- 
Your team Ubuntu Weather Developers is requested to review the proposed merge of lp:~vthompson/ubuntu-weather-app/reboot-get-initial-data-from-storage into lp:ubuntu-weather-app/reboot.
=== modified file 'app/ubuntu-weather-app.qml'
--- app/ubuntu-weather-app.qml	2015-03-08 17:23:58 +0000
+++ app/ubuntu-weather-app.qml	2015-03-13 23:40:05 +0000
@@ -56,8 +56,11 @@
 
     /*
       (re)load the pages on completion
+      TODO: Currently this is done from storage because the request blocks the
+            UI. Ideally the request to the APIs should be done via a
+            WorkerScript
     */
-    Component.onCompleted: refreshData();
+    Component.onCompleted: refreshData(true, false);
 
     /*
       Handle response data from data backend. Checks if a location


Follow ups