ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #00170
[Merge] lp:~mzanetti/reminders-app/improve-section-headers into lp:reminders-app
Michael Zanetti has proposed merging lp:~mzanetti/reminders-app/improve-section-headers into lp:reminders-app.
Commit message:
Improve section headers when sorting
Previously section headers were always built on dateCreated. Now they adjust depending on the selected sorting mechanism.
Requested reviews:
Ubuntu Reminders app developers (reminders-app-dev)
For more details, see:
https://code.launchpad.net/~mzanetti/reminders-app/improve-section-headers/+merge/251349
--
Your team Ubuntu Reminders app developers is requested to review the proposed merge of lp:~mzanetti/reminders-app/improve-section-headers into lp:reminders-app.
=== modified file 'src/app/qml/ui/NotesPage.qml'
--- src/app/qml/ui/NotesPage.qml 2015-02-25 22:48:18 +0000
+++ src/app/qml/ui/NotesPage.qml 2015-02-28 02:15:48 +0000
@@ -208,8 +208,31 @@
}
}
- section.criteria: ViewSection.FullString
- section.property: "createdString"
+ section.criteria: {
+ switch (notes.sortOrder) {
+ case Notes.SortOrderTitleAscending:
+ case Notes.SortOrderTitleDescending:
+ return ViewSection.FirstCharacter;
+ }
+
+ return ViewSection.FullString
+ }
+ section.property: {
+ switch(notes.sortOrder) {
+ case Notes.SortOrderDateCreatedNewest:
+ case Notes.SortOrderDateCreatedOldest:
+ return "createdString";
+ case Notes.SortOrderDateUpdatedNewest:
+ case Notes.SortOrderDateUpdatedOldest:
+ return "updatedString";
+ case Notes.SortOrderTitleAscending:
+ case Notes.SortOrderTitleDescending:
+ return "title";
+ }
+ return "";
+ }
+
+
section.delegate: Empty {
height: units.gu(5)
showDivider: false
Follow ups