Merge lp:~tiagosh/messaging-app/multiple_fixes into lp:messaging-app

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 222
Merged at revision: 230
Proposed branch: lp:~tiagosh/messaging-app/multiple_fixes
Merge into: lp:messaging-app
Diff against target: 148 lines (+34/-4)
3 files modified
src/qml/MainPage.qml (+1/-1)
src/qml/Messages.qml (+24/-1)
src/qml/MultiRecipientInput.qml (+9/-2)
To merge this branch: bzr merge lp:~tiagosh/messaging-app/multiple_fixes
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+233753@code.launchpad.net

Commit message

- enable the send button when any text is entered in the recipient input field.
- scroll view to the bottom when sending messages.

Description of the change

- enable the send button when any text is entered in the recipient input field.
- scroll view to the bottom when sending messages.

--Checklist--
Are there any related MPs required for this MP to build/function as expected? Please list.
No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?
Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/messaging-app) on device or emulator?
Yes

If you changed the UI, was the change specified/approved by design?
Yes

If you changed UI labels, did you update the pot file?
It will be done later.

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?
N/A

To post a comment you must log in.
218. By Tiago Salem Herrmann

force focus when bottomPanel is clicked

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
219. By Tiago Salem Herrmann

fix typo

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
220. By Tiago Salem Herrmann

Change placeholder text
add recipient when user type a comma

221. By Tiago Salem Herrmann

change screen title to Messages instead of Chats

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
222. By Tiago Salem Herrmann

invoke attachment removal popup also on onHoldAndPress

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
Yes

Did CI run pass? If not, please explain why.
Yes

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes

Code looks good and works as expected!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/MainPage.qml'
2--- src/qml/MainPage.qml 2014-09-04 03:08:20 +0000
3+++ src/qml/MainPage.qml 2014-09-11 17:40:51 +0000
4@@ -34,7 +34,7 @@
5 }
6
7 state: selectionMode ? "select" : searching ? "search" : "default"
8- title: selectionMode ? " " : i18n.tr("Chats")
9+ title: selectionMode ? " " : i18n.tr("Messages")
10
11 bottomEdgeEnabled: !selectionMode && !searching
12 bottomEdgeTitle: i18n.tr("Create new")
13
14=== modified file 'src/qml/Messages.qml'
15--- src/qml/Messages.qml 2014-09-04 18:25:47 +0000
16+++ src/qml/Messages.qml 2014-09-11 17:40:51 +0000
17@@ -50,6 +50,7 @@
18 property QtObject contactWatcher: contactWatcherInternal
19 property string lastFilter: ""
20 property string text: ""
21+ property bool pendingMessage: false
22
23 onContactWatcherChanged: {
24 if (!contactWatcher) {
25@@ -534,6 +535,12 @@
26 sortField: "timestamp"
27 sortOrder: HistorySort.DescendingOrder
28 }
29+ onCountChanged: {
30+ if (pendingMessage) {
31+ pendingMessage = false
32+ messageList.positionViewAtBeginning()
33+ }
34+ }
35 }
36
37 MessagesListView {
38@@ -558,6 +565,12 @@
39 height: selectionMode ? 0 : textEntry.height + units.gu(2)
40 visible: !selectionMode
41 clip: true
42+ MouseArea {
43+ anchors.fill: parent
44+ onClicked: {
45+ messageTextArea.forceActiveFocus()
46+ }
47+ }
48
49 Behavior on height {
50 UbuntuNumberAnimation { }
51@@ -644,9 +657,11 @@
52 anchors.fill: parent
53 onClicked: {
54 mouse.accept = true
55+ Qt.inputMethod.hide()
56 activeAttachmentIndex = index
57 PopupUtils.open(attachmentPopover, parent)
58 }
59+ onPressAndHold: clicked(mouse)
60 }
61 }
62 }
63@@ -697,9 +712,11 @@
64 anchors.fill: parent
65 onClicked: {
66 mouse.accept = true
67+ Qt.inputMethod.hide()
68 activeAttachmentIndex = index
69 PopupUtils.open(attachmentPopover, parent)
70 }
71+ onPressAndHold: clicked(mouse)
72 }
73 }
74 }
75@@ -724,9 +741,11 @@
76 anchors.fill: parent
77 onClicked: {
78 mouse.accept = true
79+ Qt.inputMethod.hide()
80 activeAttachmentIndex = index
81 PopupUtils.open(attachmentPopover, parent)
82 }
83+ onPressAndHold: clicked(mouse)
84 }
85 }
86 }
87@@ -819,7 +838,7 @@
88 font.pixelSize: FontUtils.sizeToPixels("small")
89 activeFocusOnPress: false
90 enabled: {
91- if (participants.length > 0 || multiRecipient.recipientCount > 0) {
92+ if (participants.length > 0 || multiRecipient.recipientCount > 0 || multiRecipient.searchString !== "") {
93 if (textEntry.text != "" || textEntry.inputMethodComposing || attachments.count > 0) {
94 return true
95 }
96@@ -846,6 +865,8 @@
97 if (textEntry.text == "" && attachments.count == 0) {
98 return
99 }
100+ // refresh the recipient list
101+ multiRecipient.focus = false
102 // dont change the participants list
103 if (participants.length == 0) {
104 participants = multiRecipient.recipients
105@@ -868,12 +889,14 @@
106 attachment.push(item.filePath)
107 newAttachments.push(attachment)
108 }
109+ pendingMessage = true
110 chatManager.sendMMS(participants, textEntry.text, newAttachments, messages.account.accountId)
111 textEntry.text = ""
112 attachments.clear()
113 return
114 }
115
116+ pendingMessage = true
117 chatManager.sendMessage(participants, textEntry.text, messages.account.accountId)
118 textEntry.text = ""
119 }
120
121=== modified file 'src/qml/MultiRecipientInput.qml'
122--- src/qml/MultiRecipientInput.qml 2014-08-11 22:59:14 +0000
123+++ src/qml/MultiRecipientInput.qml 2014-09-11 17:40:51 +0000
124@@ -142,7 +142,7 @@
125 width: units.gu(20)
126 hasClearButton: false
127 clip: false
128- placeholderText: multiRecipientWidget.recipientCount <= 0 ? i18n.tr("Add contacts...") :""
129+ placeholderText: multiRecipientWidget.recipientCount <= 0 ? i18n.tr("To:") :""
130 font.family: "Ubuntu"
131 font.weight: Font.Light
132 color: "#752571"
133@@ -154,7 +154,14 @@
134 text = ""
135 }
136 }
137- onTextChanged: searchString = text
138+ onTextChanged: {
139+ if (text.substring(text.length -1, text.length) == ",") {
140+ addRecipient(text.substring(0, text.length - 1))
141+ text = ""
142+ return
143+ }
144+ searchString = text
145+ }
146 Keys.onReturnPressed: {
147 if (text == "")
148 return

Subscribers

People subscribed via source and target branches