2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 15:35:51 +00:00

fixed pinned msg service message, fixed markdown stickerpack link, fixed phrase for convert group to supergroup

This commit is contained in:
John Preston
2016-03-06 19:06:05 +02:00
parent 1c722a425d
commit 420e82d421
3 changed files with 15 additions and 2 deletions

View File

@@ -7548,6 +7548,7 @@ bool HistoryServiceMsg::updatePinnedText(const QString *pfrom, QString *ptext) {
from = textcmdLink(1, _from->name);
}
TextLinkPtr second;
HistoryServicePinned *pinned = Get<HistoryServicePinned>();
if (pinned && pinned->msg) {
HistoryMedia *media = pinned->msg->getMedia();
@@ -7582,9 +7583,11 @@ bool HistoryServiceMsg::updatePinnedText(const QString *pfrom, QString *ptext) {
} else {
text = lng_action_pinned_media(lt_from, from, lt_media, textcmdLink(2, mediaText));
}
second = pinned->lnk;
result = true;
} else if (pinned && pinned->msgId) {
text = lng_action_pinned_media(lt_from, from, lt_media, textcmdLink(2, lang(lng_contacts_loading)));
second = pinned->lnk;
result = true;
} else {
text = lng_action_pinned_media(lt_from, from, lt_media, lang(lng_deleted_message));
@@ -7593,6 +7596,16 @@ bool HistoryServiceMsg::updatePinnedText(const QString *pfrom, QString *ptext) {
*ptext = text;
} else {
setServiceText(text);
_text.setLink(1, TextLinkPtr(new PeerLink(_from)));
if (second) {
_text.setLink(2, second);
}
if (history()->textCachedFor == this) {
history()->textCachedFor = 0;
}
if (App::main()) {
App::main()->dlgUpdated(history(), id);
}
}
return result;
}