← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~mzanetti/reminders-app/fix-empty-title into lp:reminders-app

 

Michael Zanetti has proposed merging lp:~mzanetti/reminders-app/fix-empty-title into lp:reminders-app.

Commit message:
Don't break when there's a note with an empty title

Requested reviews:
  Ubuntu Reminders app developers (reminders-app-dev)
Related bugs:
  Bug #1449130 in Ubuntu Notes app: "Note without title breaks NoteView"
  https://bugs.launchpad.net/reminders-app/+bug/1449130

For more details, see:
https://code.launchpad.net/~mzanetti/reminders-app/fix-empty-title/+merge/260381
-- 
Your team Ubuntu Reminders app developers is requested to review the proposed merge of lp:~mzanetti/reminders-app/fix-empty-title into lp:reminders-app.
=== modified file 'src/app/qml/ui/EditNoteView.qml'
--- src/app/qml/ui/EditNoteView.qml	2015-05-07 21:41:41 +0000
+++ src/app/qml/ui/EditNoteView.qml	2015-05-27 21:06:59 +0000
@@ -48,9 +48,9 @@
         var text = noteTextArea.text;
 
         if (note) {
-            note.title = titleTextField.text;
-            note.notebookGuid = notebookSelector.selectedGuid;
-            note.richTextContent = noteTextArea.text;
+            note.title = title;
+            note.notebookGuid = notebookGuid;
+            note.richTextContent = text;
             NotesStore.saveNote(note.guid);
         } else {
             NotesStore.createNote(title, notebookGuid, text);

=== modified file 'src/app/qml/ui/NoteView.qml'
--- src/app/qml/ui/NoteView.qml	2015-03-11 10:41:34 +0000
+++ src/app/qml/ui/NoteView.qml	2015-05-27 21:06:59 +0000
@@ -26,7 +26,7 @@
 Item {
     id: root
     property string title: contentPeerPicker.visible ? ""
-                            : note ? note.title : i18n.tr("Untitled")
+                            : (note && note.title) ? note.title : i18n.tr("Untitled")
     property var note: null
 
     signal openTaggedNotes(string title, string tagGuid)


Follow ups