2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 07:25:46 +00:00

fixed copy selected text, post author display added, post links handling added, windows bingmaps opening added, sticker previews from mentionsdropdown and stickersetbox added

This commit is contained in:
John Preston
2016-02-17 19:37:21 +03:00
parent 6a299e32d3
commit 7433cea0fd
34 changed files with 1009 additions and 425 deletions

View File

@@ -688,11 +688,12 @@ void PhotoCancelLink::onClick(Qt::MouseButton button) const {
if (!data->date) return;
if (data->uploading()) {
HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0);
if (HistoryMessage *msg = item->toHistoryMessage()) {
if (msg->getMedia() && msg->getMedia()->type() == MediaTypePhoto && static_cast<HistoryPhoto*>(msg->getMedia())->photo() == data) {
App::contextItem(item);
App::main()->deleteLayer(-2);
if (HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0)) {
if (HistoryMessage *msg = item->toHistoryMessage()) {
if (msg->getMedia() && msg->getMedia()->type() == MediaTypePhoto && static_cast<HistoryPhoto*>(msg->getMedia())->photo() == data) {
App::contextItem(item);
App::main()->deleteLayer(-2);
}
}
}
} else {
@@ -964,11 +965,12 @@ void DocumentCancelLink::onClick(Qt::MouseButton button) const {
if (!data->date) return;
if (data->uploading()) {
HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0);
if (HistoryMessage *msg = item->toHistoryMessage()) {
if (msg->getMedia() && msg->getMedia()->getDocument() == data) {
App::contextItem(item);
App::main()->deleteLayer(-2);
if (HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0)) {
if (HistoryMessage *msg = item->toHistoryMessage()) {
if (msg->getMedia() && msg->getMedia()->getDocument() == data) {
App::contextItem(item);
App::main()->deleteLayer(-2);
}
}
}
} else {