Merge lp:~mzanetti/telegram-app/reply into lp:telegram-app

Proposed by Michael Zanetti
Status: Merged
Approved by: MichaƂ Karnicki
Approved revision: 161
Merged at revision: 158
Proposed branch: lp:~mzanetti/telegram-app/reply
Merge into: lp:telegram-app
Prerequisite: lp:~mzanetti/telegram-app/listitem
Diff against target: 121 lines (+26/-12)
4 files modified
telegram/app/qml/AccountMessageList.qml (+7/-0)
telegram/app/qml/AccountSendMessage.qml (+12/-8)
telegram/app/qml/MessageReplyItem.qml (+4/-3)
telegram/app/qml/components/DialogsListItem.qml (+3/-1)
To merge this branch: bzr merge lp:~mzanetti/telegram-app/reply
Reviewer Review Type Date Requested Status
libqtelegram team Pending
Review via email: mp+287555@code.launchpad.net

Commit message

Add support for reply messages

To post a comment you must log in.
lp:~mzanetti/telegram-app/reply updated
160. By Michael Zanetti

merge prereq

161. By Michael Zanetti

merge prereq

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'telegram/app/qml/AccountMessageList.qml'
2--- telegram/app/qml/AccountMessageList.qml 2016-03-01 11:30:54 +0000
3+++ telegram/app/qml/AccountMessageList.qml 2016-03-01 11:30:54 +0000
4@@ -248,6 +248,13 @@
5 onTriggered: Clipboard.push(item.message)
6 },
7 Action {
8+ iconName: "mail-reply"
9+ text: i18n.tr("Reply")
10+ onTriggered: {
11+ acc_msg_list.replyToRequest(message.id);
12+ }
13+ },
14+ Action {
15 iconName: "info"
16 text: i18n.tr("Sticker Pack info")
17 visible: message_item.isSticker && telegramObject.documentStickerId(message_item.media.document) !== 0
18
19=== modified file 'telegram/app/qml/AccountSendMessage.qml'
20--- telegram/app/qml/AccountSendMessage.qml 2016-02-29 10:22:26 +0000
21+++ telegram/app/qml/AccountSendMessage.qml 2016-03-01 11:30:54 +0000
22@@ -1,5 +1,6 @@
23 import QtQuick 2.4
24 import Ubuntu.Components 1.3
25+import Ubuntu.Components 1.3 as UC
26 import Ubuntu.Components.Popups 0.1
27 import Ubuntu.Components.ListItems 1.0 as ListItem
28 import Ubuntu.Connectivity 1.0
29@@ -369,8 +370,8 @@
30 // if(privates.suggestionItem)
31 // privates.suggestionItem.destroy()
32
33- smsg.accepted(msg, 0);//messageReply.replyMessage? messageReply.replyMessage.id : 0)
34-// messageReply.discard()
35+ smsg.accepted(msg, messageReply.replyMessage? messageReply.replyMessage.id : 0)
36+ messageReply.discard()
37 txt.text = ""
38 }
39
40@@ -403,25 +404,28 @@
41 Rectangle {
42 anchors.fill: parent
43 color: smsg.color
44- opacity: 0.8
45 }
46
47 MessageReplyItem {
48 id: messageReply
49 telegram: telegramObject
50+ maximumWidth: parent.width - units.gu(6)
51
52 function discard() {
53 messageReply.replyMessage = messageReply.message
54 }
55 }
56
57- Button {
58- width: height
59+ AbstractButton {
60+ width: units.gu(4)
61+ height: width
62 anchors.right: parent.right
63- anchors.rightMargin: 4*Devices.density
64+ anchors.rightMargin: units.gu(1)
65 anchors.verticalCenter: parent.verticalCenter
66- //iconSource: "files/close.png"
67- text: i18n.tr("Close")
68+ Icon {
69+ anchors.fill: parent
70+ name: "close"
71+ }
72 onClicked: messageReply.discard()
73 }
74 }
75
76=== modified file 'telegram/app/qml/MessageReplyItem.qml'
77--- telegram/app/qml/MessageReplyItem.qml 2015-10-01 15:18:23 +0000
78+++ telegram/app/qml/MessageReplyItem.qml 2016-03-01 11:30:54 +0000
79@@ -37,7 +37,7 @@
80 id: reply_separator
81 width: units.dp(2)
82 height: parent.height
83- color: message.out ? Colors.dark_green : Colors.telegram_blue
84+ color: !message || message.out ? UbuntuColors.green : UbuntuColors.blue
85 }
86
87 Column {
88@@ -51,7 +51,6 @@
89 // font.family: AsemanApp.globalFont.family
90 fontSize: "small"
91 font.weight: Font.Normal
92- // opacity: 0.8
93 color: message.out ? Colors.dark_green : Colors.telegram_blue
94 // if(!replyMessage && (!message || message.out))
95 // return Cutegram.currentTheme.messageOutgoingNameColor
96@@ -172,7 +171,9 @@
97 return ""
98
99 var replyMsg = replyMessage? replyMessage : telegram.message(message.replyToMsgId)
100- return emojis.textToEmojiText(replyMsg.message,16,true)
101+ // We use emojis in the font for now, no need to replace them
102+ //return emojis.textToEmojiText(replyMsg.message,16,true)
103+ return replyMsg.message
104 }
105
106 property real htmlWidth: Cutegram.htmlWidth(text)
107
108=== modified file 'telegram/app/qml/components/DialogsListItem.qml'
109--- telegram/app/qml/components/DialogsListItem.qml 2015-10-30 09:57:14 +0000
110+++ telegram/app/qml/components/DialogsListItem.qml 2016-03-01 11:30:54 +0000
111@@ -187,7 +187,9 @@
112 // TRANSLATORS: Indicates in a subtitle of a dialog list item that someone is typing.
113 return i18n.tr("typing...")
114 } else {
115- return emojis.bodyTextToEmojiText(message.message, 16, true);
116+ // We use emojis in our font currently, so no need to replace them here for now
117+ //return emojis.bodyTextToEmojiText(message.message, 16, true);
118+ return message.message
119 }
120 }
121 }

Subscribers

People subscribed via source and target branches

to status/vote changes: