~phablet-team/messaging-app/select-part-of-message

« back to all changes in this revision

Viewing changes to src/qml/MessagesListView.qml

  • Committer: Tiago Salem Herrmann
  • Date: 2017-02-08 21:04:29 UTC
  • mfrom: (639.12.11 sort-thread)
  • Revision ID: tiago.herrmann@canonical.com-20170208210429-kk2s6v6jbxj8qnmr
merge parent

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
    property var _currentSwipedItem: null
32
32
    property string latestEventId: ""
 
33
    property var account: null
33
34
 
34
35
    function shareSelectedMessages()
35
36
    {
92
93
            var properties = {"messageData": model,
93
94
                              "index": Qt.binding(function(){ return index }),
94
95
                              "delegateItem": Qt.binding(function(){ return loader })}
95
 
            var sourceFile = textMessageType == HistoryThreadModel.MessageTypeInformation ? "AccountSectionDelegate.qml" : "RegularMessageDelegate.qml"
 
96
            var sourceFile =textMessageType == HistoryThreadModel.MessageTypeInformation ? "AccountSectionDelegate.qml" : "RegularMessageDelegate.qml"
 
97
            sourceFile = application.delegateFromProtocol(Qt.resolvedUrl(sourceFile), account ? account.protocolInfo.name : "")
96
98
            loader.setSource(sourceFile, properties)
97
99
        }
 
100
 
 
101
        Binding {
 
102
            target: loader.item
 
103
            property: "account"
 
104
            value: root.account
 
105
            when: (textMessageType !== HistoryThreadModel.MessageTypeInformation && Loader.Ready)
 
106
        }
98
107
    }
99
108
 
100
109
    onSelectionDone: {