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()
|
void ChatForm::onTextEditChanged()
|
||||||
{
|
{
|
||||||
bool isNowTyping;
|
|
||||||
if (!Settings::getInstance().isTypingNotificationEnabled())
|
if (!Settings::getInstance().isTypingNotificationEnabled())
|
||||||
isNowTyping = false;
|
{
|
||||||
else
|
if (isTyping)
|
||||||
isNowTyping = msgEdit->toPlainText().length() > 0;
|
Core::getInstance()->sendTyping(f->getFriendID(), false);
|
||||||
|
isTyping = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (isNowTyping)
|
if (msgEdit->toPlainText().length() > 0)
|
||||||
|
{
|
||||||
typingTimer.start(3000);
|
typingTimer.start(3000);
|
||||||
|
if (!isTyping)
|
||||||
Core::getInstance()->sendTyping(f->getFriendID(), isNowTyping);
|
Core::getInstance()->sendTyping(f->getFriendID(), (isTyping = true));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Core::getInstance()->sendTyping(f->getFriendID(), (isTyping = false));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatForm::onAttachClicked()
|
void ChatForm::onAttachClicked()
|
||||||
|
|
|
@ -122,6 +122,7 @@ private:
|
||||||
QString secondsToDHMS(quint32 duration);
|
QString secondsToDHMS(quint32 duration);
|
||||||
CallConfirmWidget *callConfirm;
|
CallConfirmWidget *callConfirm;
|
||||||
void enableCallButtons();
|
void enableCallButtons();
|
||||||
|
bool isTyping;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CHATFORM_H
|
#endif // CHATFORM_H
|
||||||
|
|
Loading…
Reference in New Issue
Block a user