diff --git a/Telegram/SourceFiles/autoupdater.cpp b/Telegram/SourceFiles/autoupdater.cpp index d560cfbc6..a34a471c6 100644 --- a/Telegram/SourceFiles/autoupdater.cpp +++ b/Telegram/SourceFiles/autoupdater.cpp @@ -569,6 +569,8 @@ bool checkReadyUpdate() { return true; } +#endif + QString countBetaVersionSignature(uint64 version) { // duplicated in packer.cpp if (cBetaPrivateKey().isEmpty()) { LOG(("Error: Trying to count beta version signature without beta private key!")); @@ -613,4 +615,3 @@ QString countBetaVersionSignature(uint64 version) { // duplicated in packer.cpp return QString::fromUtf8(signature.mid(19, 32)); } -#endif diff --git a/Telegram/SourceFiles/autoupdater.h b/Telegram/SourceFiles/autoupdater.h index 0bee6fae3..e15d7fe09 100644 --- a/Telegram/SourceFiles/autoupdater.h +++ b/Telegram/SourceFiles/autoupdater.h @@ -66,6 +66,11 @@ private: bool checkReadyUpdate(); -QString countBetaVersionSignature(uint64 version); +#else +class UpdateDownloader : public QObject { + Q_OBJECT +}; #endif + +QString countBetaVersionSignature(uint64 version); diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 02762346c..afe6316df 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -4575,6 +4575,8 @@ void HistoryWidget::onDocumentSelect() { void HistoryWidget::dragEnterEvent(QDragEnterEvent *e) { if (!_history) return; + if (_peer && (_peer->isChannel() && !_peer->asChannel()->canPublish())) return; + _attachDrag = getDragState(e->mimeData()); updateDragAreas(); @@ -4876,6 +4878,8 @@ void HistoryWidget::onPhotoDrop(const QMimeData *data) { void HistoryWidget::onDocumentDrop(const QMimeData *data) { if (!_history) return; + if (_peer && (_peer->isChannel() && !_peer->asChannel()->canPublish())) return; + QStringList files = getMediasFromMime(data); if (files.isEmpty()) return; @@ -4883,6 +4887,9 @@ void HistoryWidget::onDocumentDrop(const QMimeData *data) { } void HistoryWidget::onFilesDrop(const QMimeData *data) { + + if (_peer && (_peer->isChannel() && !_peer->asChannel()->canPublish())) return; + QStringList files = getMediasFromMime(data); if (files.isEmpty()) { if (data->hasImage()) { diff --git a/Telegram/Telegram.pro b/Telegram/Telegram.pro index 8c851b7b2..48077b5c4 100644 --- a/Telegram/Telegram.pro +++ b/Telegram/Telegram.pro @@ -89,6 +89,7 @@ SOURCES += \ ./SourceFiles/autoupdater.cpp \ ./SourceFiles/dialogswidget.cpp \ ./SourceFiles/dropdown.cpp \ + ./SourceFiles/facades.cpp \ ./SourceFiles/fileuploader.cpp \ ./SourceFiles/history.cpp \ ./SourceFiles/historywidget.cpp \ @@ -112,6 +113,7 @@ SOURCES += \ ./SourceFiles/types.cpp \ ./SourceFiles/window.cpp \ ./SourceFiles/mtproto/mtp.cpp \ + ./SourceFiles/mtproto/mtpAuthKey.cpp \ ./SourceFiles/mtproto/mtpConnection.cpp \ ./SourceFiles/mtproto/mtpCoreTypes.cpp \ ./SourceFiles/mtproto/mtpDC.cpp \ @@ -175,6 +177,7 @@ HEADERS += \ ./SourceFiles/countries.h \ ./SourceFiles/dialogswidget.h \ ./SourceFiles/dropdown.h \ + ./SourceFiles/facades.h \ ./SourceFiles/fileuploader.h \ ./SourceFiles/history.h \ ./SourceFiles/historywidget.h \