ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #04549
[Merge] lp:~nik90/ubuntu-clock-app/fix-alarm-list-refresh into lp:ubuntu-clock-app
Nekhelesh Ramananthan has proposed merging lp:~nik90/ubuntu-clock-app/fix-alarm-list-refresh into lp:ubuntu-clock-app.
Commit message:
Refresh alarmModel when the alarm being edited is saved to ensure that the listview shows updated labels.
Requested reviews:
Ubuntu Clock Developers (ubuntu-clock-dev)
Related bugs:
Bug #1488439 in Ubuntu Clock App: "Editing alarms re-orders them but the list view isn’t updated"
https://bugs.launchpad.net/ubuntu-clock-app/+bug/1488439
For more details, see:
https://code.launchpad.net/~nik90/ubuntu-clock-app/fix-alarm-list-refresh/+merge/269047
Refresh alarmModel when the alarm being edited is saved to ensure that the listview shows updated labels.
--
Your team Ubuntu Clock Developers is requested to review the proposed merge of lp:~nik90/ubuntu-clock-app/fix-alarm-list-refresh into lp:ubuntu-clock-app.
=== modified file 'app/alarm/AlarmList.qml'
--- app/alarm/AlarmList.qml 2015-08-12 14:24:08 +0000
+++ app/alarm/AlarmList.qml 2015-08-25 11:29:30 +0000
@@ -71,7 +71,7 @@
if (selectMode) {
selected = !selected
} else {
- pageStack.push(Qt.resolvedUrl("EditAlarmPage.qml"), {isNewAlarm: false, tempAlarm: model})
+ pageStack.push(Qt.resolvedUrl("EditAlarmPage.qml"), {isNewAlarm: false, tempAlarm: model, alarmModel: alarmModel})
}
}
=== modified file 'app/alarm/EditAlarmPage.qml'
--- app/alarm/EditAlarmPage.qml 2015-08-24 16:30:33 +0000
+++ app/alarm/EditAlarmPage.qml 2015-08-25 11:29:30 +0000
@@ -28,11 +28,9 @@
id: _addAlarmPage
objectName: "AddAlarmPage"
- // Property to determine if this is a new/saved alarm
- property bool isNewAlarm: true
-
- // Temporary alarm used to read saved alarm and modify them
+ property var alarmModel
property var tempAlarm
+ readonly property bool isNewAlarm: true
title: isNewAlarm ? i18n.tr("New alarm") : i18n.tr("Edit alarm")
visible: false
@@ -112,6 +110,7 @@
if(validateAlarm(tempAlarm)) {
pageStack.pop()
+ alarmModel.refresh()
}
}
=== modified file 'debian/changelog'
--- debian/changelog 2015-08-23 13:25:17 +0000
+++ debian/changelog 2015-08-25 11:29:30 +0000
@@ -28,6 +28,7 @@
* Fixed alarm sound preview not playing when pressing on the checkbox (LP: #1487690)
* Fixed edited alarm not being saveable if at any point of editing the alarm
clock app loses focus (LP: #1487789)
+ * Fixed edited alarmed when saved doesn't update the listview (LP: #1488439)
[Victor Thompson]
* Show all README files in QtCreator
Follow ups