diff --git a/Telegram/SourceFiles/codegen/style/processor.cpp b/Telegram/SourceFiles/codegen/style/processor.cpp
index 5c385f25f..b093a8d47 100644
--- a/Telegram/SourceFiles/codegen/style/processor.cpp
+++ b/Telegram/SourceFiles/codegen/style/processor.cpp
@@ -78,7 +78,7 @@ bool Processor::write(const structure::Module &module) const {
"codegen_style",
srcFile.fileName(),
"stdafx.h",
- !options_.rebuildDependencies, // forceReGenerate
+ false,//!options_.rebuildDependencies, // forceReGenerate
};
SpriteGenerator spriteGenerator(module);
diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp
index 2a61878b0..f26c05995 100644
--- a/Telegram/SourceFiles/history.cpp
+++ b/Telegram/SourceFiles/history.cpp
@@ -2553,6 +2553,26 @@ public:
_fullDisplayed = full;
}
+ // Copy to clipboard support.
+ void copyToClipboard() const override {
+ if (auto button = getButton()) {
+ if (button->type == HistoryMessageReplyMarkup::Button::Url) {
+ auto url = QString::fromUtf8(button->data);
+ if (!url.isEmpty()) {
+ QApplication::clipboard()->setText(url);
+ }
+ }
+ }
+ }
+ QString copyToClipboardContextItemText() const override {
+ if (auto button = getButton()) {
+ if (button->type == HistoryMessageReplyMarkup::Button::Url) {
+ return lang(lng_context_copy_link);
+ }
+ }
+ return QString();
+ }
+
// Finds the corresponding button in the items markup struct.
// If the button is not found it returns nullptr.
// Note: it is possible that we will point to the different button
@@ -3116,7 +3136,7 @@ bool HistoryItem::canEdit(const QDateTime &cur) const {
auto channel = _history->peer->asChannel();
return (channel->amCreator() || (channel->amEditor() && out()));
}
- return out();
+ return out() || (peerToUser(_history->peer->id) == MTP::authedId());
}
return false;
}
@@ -5831,7 +5851,7 @@ void HistoryWebPage::draw(Painter &p, const QRect &r, TextSelection selection, u
_attach->draw(p, r.translated(-attachLeft, -attachTop), attachSelection, ms);
int32 pixwidth = _attach->currentWidth(), pixheight = _attach->height();
- if (_data->type == WebPageVideo) {
+ if (_data->type == WebPageVideo && _attach->type() == MediaTypePhoto) {
if (_data->siteName == qstr("YouTube")) {
p.drawSprite(QPoint((pixwidth - st::youtubeIcon.pxWidth()) / 2, (pixheight - st::youtubeIcon.pxHeight()) / 2), st::youtubeIcon);
} else {
diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp
index 089dab499..f8f6679e7 100644
--- a/Telegram/SourceFiles/historywidget.cpp
+++ b/Telegram/SourceFiles/historywidget.cpp
@@ -1111,7 +1111,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
}
}
}
- if (msg && (!msg->emptyText() || mediaHasTextForCopy)) {
+ if (msg && !_contextMenuLnk && (!msg->emptyText() || mediaHasTextForCopy)) {
_menu->addAction(lang(lng_context_copy_text), this, SLOT(copyContextText()))->setEnabled(true);
}
}
diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_result.cpp b/Telegram/SourceFiles/inline_bots/inline_bot_result.cpp
index 4afa92309..ac8400509 100644
--- a/Telegram/SourceFiles/inline_bots/inline_bot_result.cpp
+++ b/Telegram/SourceFiles/inline_bots/inline_bot_result.cpp
@@ -209,6 +209,7 @@ bool Result::onChoose(Layout::ItemBase *layout) {
_photo->thumb->loadEvenCancelled();
_photo->medium->loadEvenCancelled();
}
+ return false;
}
if (_document && (
_type == Type::Video ||
@@ -224,9 +225,9 @@ bool Result::onChoose(Layout::ItemBase *layout) {
} else {
DocumentOpenClickHandler::doOpen(_document, ActionOnLoadNone);
}
- } else {
- return true;
+ return false;
}
+ return true;
}
return true;
}
diff --git a/Telegram/Telegram.vcxproj b/Telegram/Telegram.vcxproj
index cb71ca57b..8936c0643 100644
--- a/Telegram/Telegram.vcxproj
+++ b/Telegram/Telegram.vcxproj
@@ -2338,8 +2338,8 @@
Rcc%27ing %(Identity)...
.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)
"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp
- %(FullPath);.\Resources\art\icon256.png;%(AdditionalInputs)
- %(FullPath);.\Resources\art\icon256.png;%(AdditionalInputs)
+ %(FullPath);.\Resources\art\icon256.png;.\Resources\art\sprite_125x.png;.\Resources\art\sprite_150x.png;%(AdditionalInputs)
+ %(FullPath);.\Resources\art\icon256.png;.\Resources\art\sprite_125x.png;.\Resources\art\sprite_150x.png;%(AdditionalInputs)
Rcc%27ing %(Identity)...
Rcc%27ing %(Identity)...
.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)
diff --git a/Telegram/Telegram.vcxproj.filters b/Telegram/Telegram.vcxproj.filters
index 2fba282fa..b585b9a90 100644
--- a/Telegram/Telegram.vcxproj.filters
+++ b/Telegram/Telegram.vcxproj.filters
@@ -1591,9 +1591,9 @@
Resources
-
+
Resources
-
+
Resources