Enabled sending stickers from the sticker set preview box.

This commit is contained in:
John Preston
2016-09-11 11:38:14 +03:00
parent 8419a56e10
commit c7e8b153bb
6 changed files with 98 additions and 29 deletions
+6 -5
View File
@@ -7458,8 +7458,8 @@ void HistoryWidget::onFieldTabbed() {
}
}
void HistoryWidget::onStickerSend(DocumentData *sticker) {
sendExistingDocument(sticker, QString());
bool HistoryWidget::onStickerSend(DocumentData *sticker) {
return sendExistingDocument(sticker, QString());
}
void HistoryWidget::onPhotoSend(PhotoData *photo) {
@@ -7646,14 +7646,14 @@ void HistoryWidget::ReplyEditMessageDataCallback::call(ChannelData *channel, Msg
}
}
void HistoryWidget::sendExistingDocument(DocumentData *doc, const QString &caption) {
bool HistoryWidget::sendExistingDocument(DocumentData *doc, const QString &caption) {
if (!_history || !doc || !canSendMessages(_peer)) {
return;
return false;
}
MTPInputDocument mtpInput = doc->mtpInput();
if (mtpInput.type() == mtpc_inputDocumentEmpty) {
return;
return false;
}
App::main()->readServerHistory(_history);
@@ -7707,6 +7707,7 @@ void HistoryWidget::sendExistingDocument(DocumentData *doc, const QString &capti
if (!_emojiPan->isHidden()) _emojiPan->hideStart();
_field.setFocus();
return true;
}
void HistoryWidget::sendExistingPhoto(PhotoData *photo, const QString &caption) {