Merge lp:~vthompson/ubuntu-weather-app/reboot-pull-refresh into lp:ubuntu-weather-app

Proposed by Victor Thompson
Status: Merged
Approved by: Martin Borho
Approved revision: 20
Merged at revision: 19
Proposed branch: lp:~vthompson/ubuntu-weather-app/reboot-pull-refresh
Merge into: lp:ubuntu-weather-app
Diff against target: 28 lines (+11/-0)
1 file modified
app/ui/HomePage.qml (+11/-0)
To merge this branch: bzr merge lp:~vthompson/ubuntu-weather-app/reboot-pull-refresh
Reviewer Review Type Date Requested Status
Martin Borho Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+252832@code.launchpad.net

Commit message

* Add pull to refresh support

Description of the change

This is a simple change to get "Pull to refresh" working. Currently, the consensus is that we will add an icon to trigger a refresh of the data--however, I wanted to see what other people thought of this approach.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Martin Borho (martin-borho) wrote :

I'm totally fine with this! Haven't thought it's that easy, feels great to use!

Nonetheless, it does not pull back after the refresh has finished. I did this to have it closed after refresh: http://paste.ubuntu.com/10590531/

review: Needs Fixing
Revision history for this message
Victor Thompson (vthompson) wrote :

Ah, great! Thanks Martin!

20. By Victor Thompson

Fix indicator not going away.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Martin Borho (martin-borho) wrote :

Thanks, LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/ui/HomePage.qml'
2--- app/ui/HomePage.qml 2015-03-03 18:37:59 +0000
3+++ app/ui/HomePage.qml 2015-03-13 15:47:25 +0000
4@@ -87,6 +87,16 @@
5 height: parent.height
6 contentWidth: parent.width
7
8+ PullToRefresh {
9+ id: pullToRefresh
10+ parent: locationFlickable
11+ refreshing: false
12+ onRefresh: {
13+ refreshing = true
14+ refreshData(false, true)
15+ }
16+ }
17+
18 /*
19 ListView for locations with snap-scrolling horizontally.
20 */
21@@ -113,6 +123,7 @@
22 currentIndex = settings.current
23
24 if (model > 0) {
25+ pullToRefresh.refreshing = false
26 loaded = true
27 }
28 }

Subscribers

People subscribed via source and target branches

to all changes: