~ubuntu-weather-dev/ubuntu-weather-app/reboot

« back to all changes in this revision

Viewing changes to app/ui/LocationPane.qml

* Add support for showing updated X minutes ago. Fixes: https://bugs.launchpad.net/bugs/1583169.

Approved by Jenkins Bot, Michael Sheldon.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
    property var todayData
46
46
    property bool graphicVisible : false
47
47
 
 
48
    property var lastFetch  // don't store as int as reaches max int
 
49
 
48
50
    delegate: DayDelegate {
49
51
        day: model.day
50
52
        high: model.high
99
101
            id: homeTempInfo
100
102
            modelData: todayData
101
103
            now: mainPageWeekdayListView.currentTemp
 
104
            updatedAt: mainPageWeekdayListView.lastFetch
102
105
        }
103
106
 
104
107
        // TODO: Migrate this to using the new SDK list item when possible.
231
234
            hourlyForecastsData = hourlyForecasts;
232
235
            hourlyTempUnits = tempUnits;
233
236
        }
 
237
 
 
238
        // Set last updated time
 
239
        mainPageWeekdayListView.lastFetch = data.updated;
234
240
    }
235
241
 
236
242
    Component.onCompleted: renderData(index)