Merge lp:~rpadovani/ubuntu-clock-app/improveCheckTimeOldAlarms into lp:ubuntu-clock-app

Proposed by Riccardo Padovani on 2015-01-21
Status: Merged
Approved by: Nekhelesh Ramananthan on 2015-01-21
Approved revision: 191
Merged at revision: 190
Proposed branch: lp:~rpadovani/ubuntu-clock-app/improveCheckTimeOldAlarms
Merge into: lp:ubuntu-clock-app
Diff against target: 242 lines (+35/-35)
3 files modified
app/alarm/AlarmDelegate.qml (+6/-8)
debian/changelog (+25/-23)
debian/copyright (+4/-4)
To merge this branch: bzr merge lp:~rpadovani/ubuntu-clock-app/improveCheckTimeOldAlarms
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2015-01-21
Nekhelesh Ramananthan 2015-01-21 Approve on 2015-01-21
Review via email: mp+247213@code.launchpad.net

Commit Message

Improved function to calculate the new time of an onetime alarm

Description of the Change

Improved function to calculate the new time of an onetime alarm

To post a comment you must log in.
Nekhelesh Ramananthan (nik90) wrote :

Once https://code.launchpad.net/~nik90/ubuntu-clock-app/bump-version-3.3/+merge/247214 lands in trunk, please remerge trunk and update the debian changelog file with your name and move the following entry under your name since the logic is all yours ;)

* Fixed one-time alarms not being able to be re-enabled using the alarm switch
    after they have gone off once (LP: #1413027)

review: Needs Fixing
Nekhelesh Ramananthan (nik90) wrote :

Logic is sound and works as expected! Nice work and thnx for refining the logic again and again until it is perfect!

190. By Riccardo Padovani on 2015-01-21

Merged from trunk

191. By Riccardo Padovani on 2015-01-21

modified changelog, bumped copyright, improved logic

Nekhelesh Ramananthan (nik90) wrote :

LGTM! Approving.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/alarm/AlarmDelegate.qml'
2--- app/alarm/AlarmDelegate.qml 2015-01-21 18:43:44 +0000
3+++ app/alarm/AlarmDelegate.qml 2015-01-21 21:15:28 +0000
4@@ -102,14 +102,12 @@
5 */
6 if(checked && type === Alarm.OneTime && alarmData.date < new Date()) {
7 var currentTime = new Date()
8-
9- var twentyfourHours = 86400000 // 1000 * 60 * 60 * 24
10- var tomorrow = currentTime
11- tomorrow.setDate(tomorrow.getDate() + 1)
12- alarmData.daysOfWeek = alarmUtils.get_alarm_day(tomorrow.getDay())
13-
14- if (alarmData.date.getTime() - currentTime.getTime() > twentyfourHours) {
15- alarmData.daysOfWeek = alarmUtils.get_alarm_day(currentTime.getDay())
16+ alarmData.daysOfWeek = alarmUtils.get_alarm_day(currentTime.getDay())
17+
18+ if (alarmData.date.getTime() <= currentTime.getTime()) {
19+ var tomorrow = currentTime
20+ tomorrow.setDate(tomorrow.getDate() + 1)
21+ alarmData.daysOfWeek = alarmUtils.get_alarm_day(tomorrow.getDay())
22 }
23 }
24
25
26=== modified file 'debian/changelog'
27--- debian/changelog 2015-01-21 20:12:50 +0000
28+++ debian/changelog 2015-01-21 21:15:28 +0000
29@@ -5,14 +5,16 @@
30 * Bumped framework version to ubuntu-sdk-14.10
31 * Fixed the incorrect overriding of alarm delegate model value.
32 * Fixed qml tests broken in vivid due to listitem behaviour change.
33- * Fixed one-time alarms not being able to be re-enabled using the alarm switch
34- after they have gone off once (LP: #1413027)
35 * OneTime alarms are not automatically dismissed after they are triggered (LP: #1362341)
36
37 [Brendan Donegan]
38 * Fixed AP failure by waiting for the bottom edge tip visible property to be true
39 before trying to swipe up the bottom edge.
40
41+ [Riccardo Padovani]
42+ * Fixed one-time alarms not being able to be re-enabled using the alarm switch
43+ after they have gone off once (LP: #1413027)
44+
45 -- Nekhelesh Ramananthan <krnekhelesh@gmail.com> Wed, 21 Jan 2015 21:05:24 +0100
46
47 ubuntu-clock-app (3.2) utopic; urgency=medium
48@@ -74,7 +76,7 @@
49 * Updated pot file name
50 * Added support for user location retrieval using GPS (LP: #1323198)
51 * Added header shortcut to select/deselect all alarm repeat options (LP: #1362089)
52- * Added visual tweaks (80% opacity for disabled alarms) and show time to
53+ * Added visual tweaks (80% opacity for disabled alarms) and show time to
54 next alarm when enabling an alarm.
55 * Enabled one-time alarms in the UI (LP: #1358320)
56 * Fixed the transition animation to alarms to be more smoother (LP: #1362081)
57@@ -121,7 +123,7 @@
58 [ Daniel Holbach ]
59 * Fix debhelper-but-no-misc-depends ubuntu-clock-app-autopilot.
60 * Bump Standards-Version to 3.9.5, no changes required.
61- * Add missing build-depends.
62+ * Add missing build-depends.
63 * Run 'wrap-and-sort'.
64 * Don't try to install files from usr/bin, there are none.
65 * Install files from usr/lib.
66@@ -134,7 +136,7 @@
67 somewhat.
68 * Run tests as autopkgtest. (LP: #1354091)
69 * Don't ignore return code of autopilot test execution. (LP: #1354095)
70- * Fix path in Exec= line of .desktop file. (LP: #1354081)
71+ * Fix path in Exec= line of .desktop file. (LP: #1354081)
72 * Move module files into proper place. (LP: #1354079)
73 * Make pep8 happy.
74 * Add -I argument to Exec line in .desktop file.
75@@ -150,9 +152,9 @@
76 * Used a proper qt_imports_dir (still needs qml import updates).
77 * Moved gnuinstalldirs higher up for better path management.
78 * Removed a bunch of very custom variables and build on top.
79- * Removed the install target for the gallery directory as it was a dup
80+ * Removed the install target for the gallery directory as it was a dup
81 and going to the wrong path.
82- * Not installing icon for deb and just rely on us using the desktop
83+ * Not installing icon for deb and just rely on us using the desktop
84 default (we can depend on the suru icon set, it's there).
85 * Made some rules filter out if not in qtcreator.
86 * Changed the path for a couple of things to use common subpaths in most
87@@ -167,14 +169,14 @@
88 * Fixed a small portion of the listitem behind left behind after
89 deleting it. (LP: #1354617)
90 * Added vibration settings option for alarms (LP: #1350017)
91-
92+
93 [Michael Zanetti]
94 * Improve the performance of the world city list by creating QTimeZone
95 objects only once as they are really slow to create. (LP: #1350433)
96-
97+
98 [Nicholas Skaggs]
99 * Tweak AP setup and launching
100-
101+
102 -- Nekhelesh Ramananthan <krnekhelesh@gmail.com> Mon, 11 Aug 2014 16:20:00 +0200
103
104 ubuntu-clock-app (2.8) utopic; urgency=medium
105@@ -185,7 +187,7 @@
106 * Added fast scroll to the world city page (LP: #1349877)
107 * Implemented the world clock UI in the main clock page
108 * Added settings option to change system time in the clock app.
109-
110+
111 [Carla Sella]
112 * Setup autopilot infrastructure and added alarm test
113 * Added objectNames required for the AP tests
114@@ -198,14 +200,14 @@
115 [Nekhelesh Ramananthan]
116 * Expanded base TimeZoneModel to also take a u1db query model
117 * Added more cities to the local world city list
118- * Improved the accuracy of the clock hour hand by taking into account the
119+ * Improved the accuracy of the clock hour hand by taking into account the
120 minutes as well.
121 * Improved minute and second hand accuracy
122 * Improved the clock hands movement. It is now more smoother.
123 * Added a delete alarm button in the edit alarm page as per design
124 * Encapsulated the settings icon into an abstract button to provide haptic
125 feedback when pressed.
126-
127+
128 [Victor Thompson]
129 * Resolve build warning related to unused variable in the AlarmSettings plugin
130
131@@ -219,25 +221,25 @@
132 * Updated license headers
133 * Added support to listen to Dbus changes to the alarm settings and update
134 UI automatically.
135-
136+
137 [Victor Thompson]
138 * Update digital time every second instead of every 60 seconds
139
140 -- Nekhelesh Ramananthan <krnekhelesh@gmail.com> Wed, 30 Jul 2014 10:10:23 +0200
141-
142+
143 ubuntu-clock-app (2.5) utopic; urgency=medium
144
145 [Nekhelesh Ramananthan]
146 * Added a page to select world cities.
147 * World cities are filtered as the user types using the SDK SortFilterModel
148 * Added a XML file with a list of popular cities
149-
150+
151 [Victor Thompson]
152 * Center the plus icon in PullToAdd.qml
153 * Use the ok icon instead of save in the edit alarm page
154
155 -- Nekhelesh Ramananthan <krnekhelesh@gmail.com> Thu, 24 Jul 2014 15:20:15 +0200
156-
157+
158 ubuntu-clock-app (2.4) utopic; urgency=medium
159
160 [Nekhelesh Ramananthan]
161@@ -279,14 +281,14 @@
162 * Updated the font size of several UI elements according to design.
163
164 -- Nekhelesh Ramananthan <krnekhelesh@gmail.com> Thu, 03 Jul 2014 10:00:00 +0200
165-
166+
167 ubuntu-clock-app (2.0) utopic; urgency=medium
168
169 [Nekhelesh Ramananthan]
170 * First release of the clock app reboot
171 * Implemented Digital Mode (LP: #1267146)
172 * Fixed scrollable lists on scrollable pages (LP: #1227418)
173- * Added developer guidelines
174+ * Added developer guidelines
175
176 -- Nekhelesh Ramananthan <krnekhelesh@gmail.com> Thu, 26 Jun 2014 18:57:25 +0200
177
178@@ -306,7 +308,7 @@
179 * Return more fine-grained territorial divisions for city search results (LP: #1230153)
180 * Improve the visual appearance of the clock, timer, stopwatch and alarm
181 * Removed hour support from timer
182-
183+
184 [Sergio Schvezov]
185 * Translation for desktop and debian package
186 * Fix click package confinement issues
187@@ -338,7 +340,7 @@
188 [Paolo Rotolo]
189 * Add error message if no cities were found (LP: #1222235)
190 * Timer label updates before the timer hand reaches destination (LP: #1172869)
191- * Cancel toolbar action needs the correct icon (LP: #1222942)
192+ * Cancel toolbar action needs the correct icon (LP: #1222942)
193
194 -- Nekhelesh Ramananthan <krnekhelesh@gmail.com> Fri, 27 Sep 2013 12:47:21 +0200
195
196@@ -402,7 +404,7 @@
197
198 ubuntu-clock-app (0.3) raring; urgency=low
199
200- * Added translations support
201+ * Added translations support
202
203 -- David Planella <david.planella@ubuntu.com> Tue, 07 May 2013 16:10:25 +0200
204
205@@ -437,7 +439,7 @@
206 * Analog clock markers around 3,6,9,12 should be differentiated from others (LP: #1163852)
207 * Clock app code style does not follow qml, javascript guidelines (LP: #1167040)
208 * No easy way to set timer for an hour or more (LP: #1163854)
209-
210+
211 [ Alessandro Pozzi ]
212 * Timer function requires design for adding and editing presets (LP: #1164443)
213 * Implemented basic stopwatch functionality
214
215=== modified file 'debian/copyright'
216--- debian/copyright 2014-08-01 07:15:48 +0000
217+++ debian/copyright 2015-01-21 21:15:28 +0000
218@@ -3,20 +3,20 @@
219 Source: https://launchpad.net/ubuntu-clock-app
220
221 Files: *
222-Copyright: 2013, 2014 Canonical Ltd.
223+Copyright: 2013-2015 Canonical Ltd.
224 2013 Alessandro Pozzi <signor.hyde@gmail.com>
225 2013 Juha Ristolainen <juha.ristolainen@codemancers.fi>
226 2013 Marco Biscaro <marcobiscaro2112@gmail.com>
227- 2013, 2014 Nekhelesh Ramananthan <krnekhelesh@gmail.com>
228+ 2013-2015 Nekhelesh Ramananthan <krnekhelesh@gmail.com>
229 2013 Nick Leppänen Larsson <frals@frals.se>
230 2013 Omer Akram <om26er@ubuntu.com>
231 2013 Paolo Rotolo <paolorotolo@ubuntu.com>
232- 2013, 2014 Riccardo Padovani <rpadovani@ubuntu.com>
233+ 2013-2015 Riccardo Padovani <rpadovani@ubuntu.com>
234 2014 Bartosz Kosiorek <gang65@poczta.onet.pl>
235 License: GPL-3
236
237 Files: debian/*
238-Copyright: 2013, 2014 Canonical Ltd.
239+Copyright: 2013-2015 Canonical Ltd.
240 License: LGPL-3
241
242 License: GPL-3

Subscribers

People subscribed via source and target branches