~renatofilho/messaging-app/fix-1489330

« back to all changes in this revision

Viewing changes to src/qml/RegularMessageDelegate.qml

  • Committer: Renato Araujo Oliveira Filho
  • Date: 2016-01-14 21:41:45 UTC
  • mfrom: (458.1.26 messaging-app)
  • Revision ID: renato.filho@canonical.com-20160114214145-60n2tvfljoydequ8
Trunk merged.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import QtQuick 2.2
20
20
import Ubuntu.History 0.1
 
21
import Ubuntu.Telephony 0.1
21
22
import "dateUtils.js" as DateUtils
22
23
 
23
24
Column {
54
55
        // TODO: we have several items inside
55
56
        selected: root.isSelected(delegateItem)
56
57
        selectionMode: root.isInSelectionMode
57
 
        accountLabel: multipleAccounts ? telepathyHelper.accountForId(accountId).displayName : ""
 
58
        accountLabel: {
 
59
            var account = telepathyHelper.accountForId(accountId)
 
60
            if (account.type == AccountEntry.PhoneAccount || account.type == AccountEntry.MultimediaAccount) {
 
61
                if (multiplePhoneAccounts) {
 
62
                    return account.displayName
 
63
                }
 
64
            }
 
65
            return ""
 
66
        }
58
67
        rightSideActions: {
59
68
            var actions = []
60
69
            if (textMessageStatus === HistoryThreadModel.MessageStatusPermanentlyFailed) {