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

@ -556,7 +556,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_profile_convert_button" = "Convert to supergroup";
"lng_profile_convert_title" = "Convert to supergroup";
"lng_profile_convert_about" = "In supergroups:";
"lng_profile_convert_feature1" = "— New members can see full message history";
"lng_profile_convert_feature1" = "— New members see the full message history";
"lng_profile_convert_feature2" = "— Messages are deleted for all members";
"lng_profile_convert_feature3" = "— Members can edit their own messages";
"lng_profile_convert_feature4" = "— Creator can set a public link for the group";

View File

@ -180,12 +180,12 @@ ConfirmLinkBox::ConfirmLinkBox(const QString &url) : ConfirmBox(lang(lng_open_th
}
void ConfirmLinkBox::onOpenLink() {
Ui::hideLayer();
if (reMailStart().match(_url).hasMatch()) {
EmailLink(_url).onClick(Qt::LeftButton);
} else {
TextLink(_url).onClick(Qt::LeftButton);
}
Ui::hideLayer();
}
MaxInviteBox::MaxInviteBox(const QString &link) : AbstractBox(st::boxWidth)

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;
}