mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix #1129
This commit is contained in:
parent
6cbc5ab87c
commit
0164b53aba
|
@ -156,16 +156,24 @@ void ChatForm::onSendTriggered()
|
|||
|
||||
void ChatForm::onTextEditChanged()
|
||||
{
|
||||
bool isNowTyping;
|
||||
if (!Settings::getInstance().isTypingNotificationEnabled())
|
||||
isNowTyping = false;
|
||||
else
|
||||
isNowTyping = msgEdit->toPlainText().length() > 0;
|
||||
{
|
||||
if (isTyping)
|
||||
Core::getInstance()->sendTyping(f->getFriendID(), false);
|
||||
isTyping = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (isNowTyping)
|
||||
if (msgEdit->toPlainText().length() > 0)
|
||||
{
|
||||
typingTimer.start(3000);
|
||||
|
||||
Core::getInstance()->sendTyping(f->getFriendID(), isNowTyping);
|
||||
if (!isTyping)
|
||||
Core::getInstance()->sendTyping(f->getFriendID(), (isTyping = true));
|
||||
}
|
||||
else
|
||||
{
|
||||
Core::getInstance()->sendTyping(f->getFriendID(), (isTyping = false));
|
||||
}
|
||||
}
|
||||
|
||||
void ChatForm::onAttachClicked()
|
||||
|
|
|
@ -122,6 +122,7 @@ private:
|
|||
QString secondsToDHMS(quint32 duration);
|
||||
CallConfirmWidget *callConfirm;
|
||||
void enableCallButtons();
|
||||
bool isTyping;
|
||||
};
|
||||
|
||||
#endif // CHATFORM_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user