Merge lp:~paolorotolo/ubuntu-clock-app/fix-for-1172869 into lp:ubuntu-clock-app/saucy

Proposed by Paolo Rotolo
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 192
Merged at revision: 191
Proposed branch: lp:~paolorotolo/ubuntu-clock-app/fix-for-1172869
Merge into: lp:ubuntu-clock-app/saucy
Diff against target: 28 lines (+11/-1)
1 file modified
timer/TimerPage.qml (+11/-1)
To merge this branch: bzr merge lp:~paolorotolo/ubuntu-clock-app/fix-for-1172869
Reviewer Review Type Date Requested Status
Nekhelesh Ramananthan Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+184463@code.launchpad.net

Commit message

Fix early timer label update.

Description of the change

Fix early timer label update.
Please see: https://bugs.launchpad.net/ubuntu-clock-app/+bug/1172869

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
Nekhelesh Ramananthan (nik90) wrote :

Wow that fixes the issue. I guess we needed to look at how long the animation took and then update the work. Nice logic! I am however concerned about the performance of the app since we have added several qml timers now. After testing the issue on the desktop and phone, I can confirm this MP fixes the issue.

Can you do on small code fix though? Could you change,

13 + onTriggered: {
14 + labelTimer.text = Utils.intervalToString(hours, minutes, seconds);
15 + }

to just

onTriggered: labelTimer.text = Utils.intervalToString(hours, minutes, seconds);

We do this when there is only statement in the function. Also apply similar fix to the if-else statement below as well.

review: Needs Fixing (minor code fix)
192. By Paolo Rotolo

Removed { }.

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
Nekhelesh Ramananthan (nik90) wrote :

lgtm!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'timer/TimerPage.qml'
2--- timer/TimerPage.qml 2013-09-07 19:09:03 +0000
3+++ timer/TimerPage.qml 2013-09-08 10:32:52 +0000
4@@ -118,6 +118,14 @@
5 AnalogTimer {
6 id: analogTimer
7
8+ Timer {
9+ id: seconds_timer
10+
11+ interval: 500
12+ repeat: true
13+ onTriggered: labelTimer.text = Utils.intervalToString(hours, minutes, seconds);
14+ }
15+
16 AnalogGlowEffect {
17 id: glowEffect
18
19@@ -128,7 +136,9 @@
20
21 anchors { top: parent.top; topMargin: presetModel.count != 0 ? units.gu(9) : units.gu(12); horizontalCenter: parent.horizontalCenter }
22 inProgressFlag: (timerOn == true || analogTimer.state == "DONE") ? true : false;
23- onSecondsChanged: labelTimer.text = Utils.intervalToString(hours, minutes, seconds);
24+ onSecondsChanged: if (timerOn == true) seconds_timer.restart()
25+ else labelTimer.text = Utils.intervalToString(hours, minutes, seconds);
26+
27 onMinutesChanged: labelTimer.text = Utils.intervalToString(hours, minutes, seconds);
28 onHoursChanged: labelTimer.text = Utils.intervalToString(hours, minutes, seconds);
29

Subscribers

People subscribed via source and target branches