Merge lp:~phablet-team/messaging-app/delay_filling_participants into lp:messaging-app/staging

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 684
Merged at revision: 661
Proposed branch: lp:~phablet-team/messaging-app/delay_filling_participants
Merge into: lp:messaging-app/staging
Prerequisite: lp:~phablet-team/messaging-app/disconnect-on-exit-favorite-channels
Diff against target: 63 lines (+8/-9)
3 files modified
src/qml/GroupChatInfoPage.qml (+1/-1)
src/qml/MainPage.qml (+1/-6)
src/qml/Messages.qml (+6/-2)
To merge this branch: bzr merge lp:~phablet-team/messaging-app/delay_filling_participants
Reviewer Review Type Date Requested Status
Tiago Salem Herrmann (community) Approve
Review via email: mp+319375@code.launchpad.net

Commit message

Adapt to fetch the participants when needed.

Description of the change

Adapt to fetch the participants when needed.

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

merge parent branch

683. By Gustavo Pichorim Boiko

Get rid of one annoying warning.

684. By Tiago Salem Herrmann

do not iterate participants

Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

looks good to me.
Thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/GroupChatInfoPage.qml'
2--- src/qml/GroupChatInfoPage.qml 2017-03-15 18:10:40 +0000
3+++ src/qml/GroupChatInfoPage.qml 2017-03-15 18:10:41 +0000
4@@ -458,7 +458,7 @@
5 || model.state === 2 /*remote pending*/) {
6 return false
7 }
8- // temporary workaround
9+ // FIXME: temporary workaround
10 if (account && account.protocolInfo.name == "irc") {
11 return false
12 }
13
14=== modified file 'src/qml/MainPage.qml'
15--- src/qml/MainPage.qml 2017-03-15 18:10:40 +0000
16+++ src/qml/MainPage.qml 2017-03-15 18:10:41 +0000
17@@ -276,11 +276,6 @@
18 var properties = model.properties
19 properties["keyboardFocus"] = false
20 properties["threads"] = model.threads
21- var participantIds = [];
22- for (var i in model.participants) {
23- participantIds.push(model.participants[i].identifier)
24- }
25- properties["participantIds"] = participantIds
26 properties["presenceRequest"] = threadDelegate.presenceItem
27 if (displayedEvent != null) {
28 properties["scrollToEventId"] = displayedEvent.eventId
29@@ -331,7 +326,7 @@
30 ChatEntry {
31 id: chatEntry
32 chatType: model.properties.chatType
33- participantIds: model.properties.participantIds
34+ participantIds: model.properties.participantIds ? model.properties.participantIds : []
35 chatId: model.properties.threadId
36 accountId: model.properties.accountId
37 autoRequest: false
38
39=== modified file 'src/qml/Messages.qml'
40--- src/qml/Messages.qml 2017-03-15 18:10:40 +0000
41+++ src/qml/Messages.qml 2017-03-15 18:10:41 +0000
42@@ -717,7 +717,11 @@
43 id: groupChatAction
44 objectName: "groupChatAction"
45 iconName: "contact-group"
46- onTriggered: mainStack.addPageToCurrentColumn(messages, Qt.resolvedUrl("GroupChatInfoPage.qml"), { threadInformation: threadInformation, chatEntry: messages.chatEntry, eventModel: eventModel})
47+ onTriggered: {
48+ // at this point we are interested in the thread participants no matter what the channel type is
49+ messagesModel.requestThreadParticipants(messages.threads)
50+ mainStack.addPageToCurrentColumn(messages, Qt.resolvedUrl("GroupChatInfoPage.qml"), { threadInformation: threadInformation, chatEntry: messages.chatEntry, eventModel: eventModel})
51+ }
52 },
53 Action {
54 id: rejoinGroupChatAction
55@@ -1340,7 +1344,7 @@
56 sort: HistorySort {}
57 groupingProperty: "participants"
58 filter: messages.accountId != "" && messages.threadId != "" ? filters : null
59- matchContacts: messages.account ? messages.account.addressableVCardFields.length > 0 : false
60+ matchContacts: true
61 }
62
63 ListView {

Subscribers

People subscribed via source and target branches

to all changes: