← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~renatofilho/ubuntu-calendar-app/account-name-and-calendars into lp:ubuntu-calendar-app

 

Renato Araujo Oliveira Filho has proposed merging lp:~renatofilho/ubuntu-calendar-app/account-name-and-calendars into lp:ubuntu-calendar-app.

Commit message:
Show the account name as subtitle for calendars.

Requested reviews:
  Jenkins Bot (ubuntu-core-apps-jenkins-bot): continuous-integration
  Ubuntu Calendar Developers (ubuntu-calendar-dev)

For more details, see:
https://code.launchpad.net/~renatofilho/ubuntu-calendar-app/account-name-and-calendars/+merge/295249
-- 
Your team Ubuntu Calendar Developers is requested to review the proposed merge of lp:~renatofilho/ubuntu-calendar-app/account-name-and-calendars into lp:ubuntu-calendar-app.
=== modified file 'CalendarChoicePopup.qml'
--- CalendarChoicePopup.qml	2016-03-22 12:29:05 +0000
+++ CalendarChoicePopup.qml	2016-05-19 17:54:46 +0000
@@ -21,6 +21,7 @@
 import Ubuntu.Components 1.3
 import Ubuntu.SyncMonitor 0.1
 import Ubuntu.Components.Popups 1.3
+import Ubuntu.OnlineAccounts 0.1
 
 Page {
     id: calendarChoicePage
@@ -29,6 +30,15 @@
     property var model
     signal collectionUpdated()
 
+    function accountFromId(accountId)
+    {
+        if (accountId && accountId >= 0) {
+            return Manager.loadAccount(accountId)
+        }
+
+        return null
+    }
+
     visible: false
     header: PageHeader {
         title: i18n.tr("Calendars")
@@ -96,7 +106,13 @@
             ListItemLayout {
                 id: calendarsListLayout
 
+                Account {
+                    id: delegateAccount
+                    objectHandle: calendarChoicePage.accountFromId(modelData.extendedMetaData("collection-account-id"))
+                }
+
                 title.text: modelData.name
+                subtitle.text: delegateAccount.objectHandle ? delegateAccount.displayName : ""
                 title.objectName: "calendarName"
 
                 CheckBox {


References