Merge lp:~tiagosh/messaging-app/fix-phone-label into lp:messaging-app

Proposed by Tiago Salem Herrmann
Status: Work in progress
Proposed branch: lp:~tiagosh/messaging-app/fix-phone-label
Merge into: lp:messaging-app
Diff against target: 54 lines (+21/-2)
1 file modified
src/qml/Messages.qml (+21/-2)
To merge this branch: bzr merge lp:~tiagosh/messaging-app/fix-phone-label
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+212489@code.launchpad.net

Commit message

include phone label to the messaging thread view title.

Description of the change

include phone label to the messaging thread view title.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
86. By Tiago Salem Herrmann

merge trunk

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: Needs Fixing (continuous-integration)

Unmerged revisions

86. By Tiago Salem Herrmann

merge trunk

85. By Tiago Salem Herrmann

add phone label to the view title

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/qml/Messages.qml'
--- src/qml/Messages.qml 2014-03-20 18:39:45 +0000
+++ src/qml/Messages.qml 2014-03-25 12:50:42 +0000
@@ -41,6 +41,7 @@
41 property int orientationAngle: Screen.angleBetween(Screen.primaryOrientation, Screen.orientation)41 property int orientationAngle: Screen.angleBetween(Screen.primaryOrientation, Screen.orientation)
42 property bool landscape: orientationAngle == 90 || orientationAngle == 27042 property bool landscape: orientationAngle == 90 || orientationAngle == 270
43 property bool pendingMessage: false43 property bool pendingMessage: false
44 property string phoneNumberSubTypeLabel: ""
44 flickable: null45 flickable: null
45 title: {46 title: {
46 if (landscape) {47 if (landscape) {
@@ -51,7 +52,7 @@
51 if (contactWatcher.isUnknown) {52 if (contactWatcher.isUnknown) {
52 firstRecipient = contactWatcher.phoneNumber53 firstRecipient = contactWatcher.phoneNumber
53 } else {54 } else {
54 firstRecipient = contactWatcher.alias55 firstRecipient = contactWatcher.alias + phoneNumberSubTypeLabel
55 }56 }
56 if (participants.length == 1) {57 if (participants.length == 1) {
57 return firstRecipient58 return firstRecipient
@@ -68,6 +69,10 @@
68 threadId = getCurrentThreadId()69 threadId = getCurrentThreadId()
69 }70 }
7071
72 function updateSubTypeLabel() {
73 phoneNumberSubTypeLabel = contactWatcher.isUnknown ? "" : " - " + phoneTypeModel.get(phoneTypeModel.getTypeIndex(phoneDetail)).label
74 }
75
71 function getCurrentThreadId() {76 function getCurrentThreadId() {
72 if (participants.length == 0)77 if (participants.length == 0)
73 return ""78 return ""
@@ -193,7 +198,21 @@
193 ContactWatcher {198 ContactWatcher {
194 id: contactWatcher199 id: contactWatcher
195 phoneNumber: participants.length > 0 ? participants[0] : ""200 phoneNumber: participants.length > 0 ? participants[0] : ""
196 }201 onIsUnknownChanged: updateSubTypeLabel();
202 }
203
204 PhoneNumber {
205 id: phoneDetail
206 contexts: contactWatcher.phoneNumberContexts
207 subTypes: contactWatcher.phoneNumberSubTypes
208 onSubTypesChanged: updateSubTypeLabel();
209 onContextsChanged: updateSubTypeLabel();
210 }
211
212 ContactDetailPhoneNumberTypeModel {
213 id: phoneTypeModel
214 }
215
197216
198 onParticipantsChanged: {217 onParticipantsChanged: {
199 threadId = getCurrentThreadId()218 threadId = getCurrentThreadId()

Subscribers

People subscribed via source and target branches