ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #08926
[Merge] lp:~artmello/ubuntu-calendar-app/ubuntu-calendar-app-fix_default_reminder into lp:ubuntu-calendar-app
Arthur Mello has proposed merging lp:~artmello/ubuntu-calendar-app/ubuntu-calendar-app-fix_default_reminder into lp:ubuntu-calendar-app.
Commit message:
Fix default reminder displayed at new event view
Requested reviews:
Ubuntu Calendar Developers (ubuntu-calendar-dev)
For more details, see:
https://code.launchpad.net/~artmello/ubuntu-calendar-app/ubuntu-calendar-app-fix_default_reminder/+merge/289315
Fix default reminder displayed at new event view
--
Your team Ubuntu Calendar Developers is requested to review the proposed merge of lp:~artmello/ubuntu-calendar-app/ubuntu-calendar-app-fix_default_reminder into lp:ubuntu-calendar-app.
=== modified file 'NewEvent.qml'
--- NewEvent.qml 2016-03-14 20:25:50 +0000
+++ NewEvent.qml 2016-03-17 00:42:17 +0000
@@ -73,6 +73,11 @@
root.canceled()
}
+ function updateEventInfo(date, allDay) {
+ updateEventDate(date, allDay)
+ eventReminder.subText = eventReminder.getReminderLabel(root.reminderValue)
+ }
+
function updateEventDate(date, allDay) {
root.startDate = undefined
root.endDate = undefined
@@ -709,21 +714,21 @@
progression: true
text: i18n.tr("Reminder")
- RemindersModel {
- id: reminderModel
- }
-
- subText:{
- if(visualReminder.secondsBeforeStart !== -1) {
- for( var i=0; i<reminderModel.count; i++ ) {
- if(visualReminder.secondsBeforeStart === reminderModel.get(i).value) {
+ function getReminderLabel(value) {
+ if (value !== -1) {
+ for (var i=0; i<reminderModel.count; i++) {
+ if (reminderModel.get(i).value === value) {
return reminderModel.get(i).label
}
}
} else {
return reminderModel.get(0).label
}
+ }
+ RemindersModel {
+ id: reminderModel
+ onLoaded: eventReminder.subText = eventReminder.getReminderLabel(root.reminderValue)
}
onClicked:{
=== modified file 'NewEventBottomEdge.qml'
--- NewEventBottomEdge.qml 2016-03-14 14:30:16 +0000
+++ NewEventBottomEdge.qml 2016-03-17 00:42:17 +0000
@@ -39,7 +39,7 @@
function updateNewEventDate(date, allDay)
{
- _realPage.updateEventDate(date, allDay)
+ _realPage.updateEventInfo(date, allDay)
}
hint {
Follow ups