~tiagosh/messaging-app/state-saver

« back to all changes in this revision

Viewing changes to src/qml/MultiRecipientInput.qml

  • Committer: CI bot
  • Author(s): Tiago Salem Herrmann
  • Date: 2014-09-12 21:32:24 UTC
  • mfrom: (213.1.9 multiple_fixes)
  • Revision ID: ps-jenkins@lists.canonical.com-20140912213224-7dxje6yftulhmhx8
- enable the send button when any text is entered in the recipient input field.
- scroll view to the bottom when sending messages.
 Fixes: 1346745, 1364498, 1366896, 1367315, 1367331, 1367457
Approved by: Gustavo Pichorim Boiko, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
                    width: units.gu(20)
143
143
                    hasClearButton: false
144
144
                    clip: false
145
 
                    placeholderText: multiRecipientWidget.recipientCount  <= 0 ? i18n.tr("Add contacts...") :""
 
145
                    placeholderText: multiRecipientWidget.recipientCount  <= 0 ? i18n.tr("To:") :""
146
146
                    font.family: "Ubuntu"
147
147
                    font.weight: Font.Light
148
148
                    color: "#752571"
154
154
                            text = ""
155
155
                        }
156
156
                    }
157
 
                    onTextChanged: searchString = text
 
157
                    onTextChanged: {
 
158
                        if (text.substring(text.length -1, text.length) == ",") {
 
159
                            addRecipient(text.substring(0, text.length - 1))
 
160
                            text = ""
 
161
                            return
 
162
                        }
 
163
                        searchString = text
 
164
                    }
158
165
                    Keys.onReturnPressed: {
159
166
                        if (text == "")
160
167
                            return