mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05:00
Disable sticker button when sending is blocked
This commit is contained in:
parent
e52f1282ec
commit
9c877d3cdd
@ -439,6 +439,7 @@ void ChatWidget::blockSending(QString msg)
|
|||||||
#ifndef RS_ASYNC_CHAT
|
#ifndef RS_ASYNC_CHAT
|
||||||
sendingBlocked = true;
|
sendingBlocked = true;
|
||||||
ui->sendButton->setEnabled(false);
|
ui->sendButton->setEnabled(false);
|
||||||
|
ui->stickerButton->setEnabled(false);
|
||||||
#endif
|
#endif
|
||||||
ui->sendButton->setToolTip(msg);
|
ui->sendButton->setToolTip(msg);
|
||||||
}
|
}
|
||||||
@ -446,6 +447,7 @@ void ChatWidget::blockSending(QString msg)
|
|||||||
void ChatWidget::unblockSending()
|
void ChatWidget::unblockSending()
|
||||||
{
|
{
|
||||||
sendingBlocked = false;
|
sendingBlocked = false;
|
||||||
|
ui->stickerButton->setEnabled(true);
|
||||||
updateLenOfChatTextEdit();
|
updateLenOfChatTextEdit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1559,6 +1561,7 @@ void ChatWidget::stickerWidget()
|
|||||||
|
|
||||||
void ChatWidget::sendSticker()
|
void ChatWidget::sendSticker()
|
||||||
{
|
{
|
||||||
|
if(sendingBlocked) return;
|
||||||
QString sticker = qobject_cast<QPushButton*>(sender())->statusTip();
|
QString sticker = qobject_cast<QPushButton*>(sender())->statusTip();
|
||||||
QString encodedImage;
|
QString encodedImage;
|
||||||
if (RsHtml::makeEmbeddedImage(sticker, encodedImage, 640*480, maxMessageSize() - 200)) { //-200 for the html stuff
|
if (RsHtml::makeEmbeddedImage(sticker, encodedImage, 640*480, maxMessageSize() - 200)) { //-200 for the html stuff
|
||||||
|
Loading…
Reference in New Issue
Block a user