Merge lp:~tiagosh/messaging-app/fix-1373479 into lp:messaging-app

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 283
Merged at revision: 285
Proposed branch: lp:~tiagosh/messaging-app/fix-1373479
Merge into: lp:messaging-app
Diff against target: 44 lines (+9/-5)
1 file modified
src/qml/Messages.qml (+9/-5)
To merge this branch: bzr merge lp:~tiagosh/messaging-app/fix-1373479
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+245605@code.launchpad.net

Commit message

Scroll new messages into view.

Description of the change

Scroll new messages into view.

--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?
N/A

If you changed UI labels, did you update the pot file?
N/A

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.
283. By Tiago Salem Herrmann

remove pendingMessage logic as it is not useful anymore

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (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.
No, infrastructure problems

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/Messages.qml'
2--- src/qml/Messages.qml 2014-12-09 17:46:14 +0000
3+++ src/qml/Messages.qml 2015-01-05 19:47:32 +0000
4@@ -50,7 +50,7 @@
5 property alias contactWatcher: contactWatcherInternal
6 property string lastFilter: ""
7 property string text: ""
8- property bool pendingMessage: false
9+ property string latestEventId: ""
10
11 function addAttachmentsToModel(transfer) {
12 for (var i = 0; i < transfer.items.length; i++) {
13@@ -539,8 +539,14 @@
14 sortOrder: HistorySort.DescendingOrder
15 }
16 onCountChanged: {
17- if (pendingMessage) {
18- pendingMessage = false
19+ if (count == 0) {
20+ latestEventId = ""
21+ return
22+ }
23+ if (latestEventId == "") {
24+ latestEventId = eventModel.get(0).eventId
25+ } else if (latestEventId != eventModel.get(0).eventId) {
26+ latestEventId = eventModel.get(0).eventId
27 messageList.positionViewAtBeginning()
28 }
29 }
30@@ -904,14 +910,12 @@
31 attachment.push(item.filePath)
32 newAttachments.push(attachment)
33 }
34- pendingMessage = true
35 chatManager.sendMMS(participants, textEntry.text, newAttachments, messages.account.accountId)
36 textEntry.text = ""
37 attachments.clear()
38 return
39 }
40
41- pendingMessage = true
42 chatManager.sendMessage(participants, textEntry.text, messages.account.accountId)
43 textEntry.text = ""
44 }

Subscribers

People subscribed via source and target branches