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
=== modified file 'telegram/app/qml/AccountMessageList.qml'
--- telegram/app/qml/AccountMessageList.qml 2016-03-01 11:30:54 +0000
+++ telegram/app/qml/AccountMessageList.qml 2016-03-01 11:30:54 +0000
@@ -248,6 +248,13 @@
248 onTriggered: Clipboard.push(item.message)248 onTriggered: Clipboard.push(item.message)
249 },249 },
250 Action {250 Action {
251 iconName: "mail-reply"
252 text: i18n.tr("Reply")
253 onTriggered: {
254 acc_msg_list.replyToRequest(message.id);
255 }
256 },
257 Action {
251 iconName: "info"258 iconName: "info"
252 text: i18n.tr("Sticker Pack info")259 text: i18n.tr("Sticker Pack info")
253 visible: message_item.isSticker && telegramObject.documentStickerId(message_item.media.document) !== 0260 visible: message_item.isSticker && telegramObject.documentStickerId(message_item.media.document) !== 0
254261
=== modified file 'telegram/app/qml/AccountSendMessage.qml'
--- telegram/app/qml/AccountSendMessage.qml 2016-02-29 10:22:26 +0000
+++ telegram/app/qml/AccountSendMessage.qml 2016-03-01 11:30:54 +0000
@@ -1,5 +1,6 @@
1import QtQuick 2.41import QtQuick 2.4
2import Ubuntu.Components 1.32import Ubuntu.Components 1.3
3import Ubuntu.Components 1.3 as UC
3import Ubuntu.Components.Popups 0.14import Ubuntu.Components.Popups 0.1
4import Ubuntu.Components.ListItems 1.0 as ListItem5import Ubuntu.Components.ListItems 1.0 as ListItem
5import Ubuntu.Connectivity 1.06import Ubuntu.Connectivity 1.0
@@ -369,8 +370,8 @@
369// if(privates.suggestionItem)370// if(privates.suggestionItem)
370// privates.suggestionItem.destroy()371// privates.suggestionItem.destroy()
371372
372 smsg.accepted(msg, 0);//messageReply.replyMessage? messageReply.replyMessage.id : 0)373 smsg.accepted(msg, messageReply.replyMessage? messageReply.replyMessage.id : 0)
373// messageReply.discard()374 messageReply.discard()
374 txt.text = ""375 txt.text = ""
375 }376 }
376377
@@ -403,25 +404,28 @@
403 Rectangle {404 Rectangle {
404 anchors.fill: parent405 anchors.fill: parent
405 color: smsg.color406 color: smsg.color
406 opacity: 0.8
407 }407 }
408408
409 MessageReplyItem {409 MessageReplyItem {
410 id: messageReply410 id: messageReply
411 telegram: telegramObject411 telegram: telegramObject
412 maximumWidth: parent.width - units.gu(6)
412413
413 function discard() {414 function discard() {
414 messageReply.replyMessage = messageReply.message415 messageReply.replyMessage = messageReply.message
415 }416 }
416 }417 }
417418
418 Button {419 AbstractButton {
419 width: height420 width: units.gu(4)
421 height: width
420 anchors.right: parent.right422 anchors.right: parent.right
421 anchors.rightMargin: 4*Devices.density423 anchors.rightMargin: units.gu(1)
422 anchors.verticalCenter: parent.verticalCenter424 anchors.verticalCenter: parent.verticalCenter
423 //iconSource: "files/close.png"425 Icon {
424 text: i18n.tr("Close")426 anchors.fill: parent
427 name: "close"
428 }
425 onClicked: messageReply.discard()429 onClicked: messageReply.discard()
426 }430 }
427 }431 }
428432
=== modified file 'telegram/app/qml/MessageReplyItem.qml'
--- telegram/app/qml/MessageReplyItem.qml 2015-10-01 15:18:23 +0000
+++ telegram/app/qml/MessageReplyItem.qml 2016-03-01 11:30:54 +0000
@@ -37,7 +37,7 @@
37 id: reply_separator37 id: reply_separator
38 width: units.dp(2)38 width: units.dp(2)
39 height: parent.height39 height: parent.height
40 color: message.out ? Colors.dark_green : Colors.telegram_blue40 color: !message || message.out ? UbuntuColors.green : UbuntuColors.blue
41 }41 }
4242
43 Column {43 Column {
@@ -51,7 +51,6 @@
51 // font.family: AsemanApp.globalFont.family51 // font.family: AsemanApp.globalFont.family
52 fontSize: "small"52 fontSize: "small"
53 font.weight: Font.Normal53 font.weight: Font.Normal
54 // opacity: 0.8
55 color: message.out ? Colors.dark_green : Colors.telegram_blue54 color: message.out ? Colors.dark_green : Colors.telegram_blue
56// if(!replyMessage && (!message || message.out))55// if(!replyMessage && (!message || message.out))
57// return Cutegram.currentTheme.messageOutgoingNameColor56// return Cutegram.currentTheme.messageOutgoingNameColor
@@ -172,7 +171,9 @@
172 return ""171 return ""
173172
174 var replyMsg = replyMessage? replyMessage : telegram.message(message.replyToMsgId)173 var replyMsg = replyMessage? replyMessage : telegram.message(message.replyToMsgId)
175 return emojis.textToEmojiText(replyMsg.message,16,true)174 // We use emojis in the font for now, no need to replace them
175 //return emojis.textToEmojiText(replyMsg.message,16,true)
176 return replyMsg.message
176 }177 }
177178
178 property real htmlWidth: Cutegram.htmlWidth(text)179 property real htmlWidth: Cutegram.htmlWidth(text)
179180
=== modified file 'telegram/app/qml/components/DialogsListItem.qml'
--- telegram/app/qml/components/DialogsListItem.qml 2015-10-30 09:57:14 +0000
+++ telegram/app/qml/components/DialogsListItem.qml 2016-03-01 11:30:54 +0000
@@ -187,7 +187,9 @@
187 // TRANSLATORS: Indicates in a subtitle of a dialog list item that someone is typing.187 // TRANSLATORS: Indicates in a subtitle of a dialog list item that someone is typing.
188 return i18n.tr("typing...")188 return i18n.tr("typing...")
189 } else {189 } else {
190 return emojis.bodyTextToEmojiText(message.message, 16, true);190 // We use emojis in our font currently, so no need to replace them here for now
191 //return emojis.bodyTextToEmojiText(message.message, 16, true);
192 return message.message
191 }193 }
192 }194 }
193 }195 }

Subscribers

People subscribed via source and target branches

to status/vote changes: