Merge lp:~libqtelegram-team/telegram-app/show-secret-chat-information-in-account-page into lp:telegram-app

Proposed by Jin
Status: Merged
Approved by: Roberto Mier Escandon
Approved revision: 187
Merged at revision: 188
Proposed branch: lp:~libqtelegram-team/telegram-app/show-secret-chat-information-in-account-page
Merge into: lp:telegram-app
Diff against target: 71 lines (+17/-13)
2 files modified
telegram/app/qml/AccountMessageAction.qml (+6/-9)
telegram/app/qml/components/DialogsListItem.qml (+11/-4)
To merge this branch: bzr merge lp:~libqtelegram-team/telegram-app/show-secret-chat-information-in-account-page
Reviewer Review Type Date Requested Status
Roberto Mier Escandon (community) Approve
Review via email: mp+294779@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Roberto Mier Escandon (rmescandon) :
review: Approve
Revision history for this message
Jin (jindallo) wrote :

@Roberto,

Thanks for your approval!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'telegram/app/qml/AccountMessageAction.qml'
2--- telegram/app/qml/AccountMessageAction.qml 2016-05-04 08:00:12 +0000
3+++ telegram/app/qml/AccountMessageAction.qml 2016-05-16 06:53:35 +0000
4@@ -52,15 +52,18 @@
5 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
6 text: {
7 var res = ""
8- var userName
9+ var userName = user.firstName + " " + user.lastName
10 var fromUserName = fromUser.firstName + " " + fromUser.lastName
11+ userName = userName.trim()
12 fromUserName = fromUserName.trim()
13
14 switch(action.classType) {
15 case typeMessageActionChatCreate:
16 if (action.title == "Secret Chat") {
17- // TRANSLATORS: %1 indicates who created the secret chat.
18- res = i18n.tr("%1 created a secret chat").arg(fromUserName);
19+ if (user.id == telegramObject.me)
20+ res = i18n.tr("You have invited %1 to join a secret chat.").arg(fromUserName)
21+ else
22+ res = i18n.tr("%1 invited you to join a secret chat.").arg(fromUserName)
23 } else {
24 if (fromUser.id == telegramObject.me)
25 res = i18n.tr("You created the group")
26@@ -70,9 +73,6 @@
27 break
28
29 case typeMessageActionChatAddUser:
30- userName = user.firstName + " " + user.lastName
31- userName = userName.trim()
32-
33 if (fromUser.id == telegramObject.me)
34 res = i18n.tr("You added <b>%1</b>").arg(userName)
35 else if (user.id == telegramObject.me)
36@@ -82,9 +82,6 @@
37 break
38
39 case typeMessageActionChatDeleteUser:
40- userName = user.firstName + " " + user.lastName
41- userName = userName.trim()
42-
43 if (user.id == fromUser.id) {
44 // TRANSLATORS: %1 is the person, who left the group chat.
45 res = i18n.tr("<b>%1</b> left the group").arg(userName)
46
47=== modified file 'telegram/app/qml/components/DialogsListItem.qml'
48--- telegram/app/qml/components/DialogsListItem.qml 2016-05-04 08:00:12 +0000
49+++ telegram/app/qml/components/DialogsListItem.qml 2016-05-16 06:53:35 +0000
50@@ -208,10 +208,17 @@
51
52 switch(message.action.classType) {
53 case typeMessageActionChatCreate:
54- if (fromUser.id == telegramObject.me)
55- res = i18n.tr("<font color=\"DarkBlue\">You created the group</font>")
56- else
57- res = i18n.tr("<font color=\"DarkBlue\">%1 created the group</font>").arg(fromUserName)
58+ if (message.action.title == "Secret Chat") {
59+ if (user.id == telegramObject.me)
60+ res = i18n.tr("<font color=\"DarkBlue\">%1 joined your secret chat.</font>").arg(fromUserName)
61+ else
62+ res = i18n.tr("<font color=\"DarkBlue\">You joined the secret chat.</font>")
63+ } else {
64+ if (fromUser.id == telegramObject.me)
65+ res = i18n.tr("<font color=\"DarkBlue\">You created the group</font>")
66+ else
67+ res = i18n.tr("<font color=\"DarkBlue\">%1 created the group</font>").arg(fromUserName)
68+ }
69 break
70
71 case typeMessageActionChatAddUser:

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: