mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix regression showing is typing too often
This commit is contained in:
parent
0cffcef322
commit
48c58322f3
|
@ -901,11 +901,6 @@ QString ChatForm::secondsToDHMS(quint32 duration)
|
||||||
return cD + res.sprintf("%dd%02dh %02dm %02ds", days, hours, minutes, seconds);
|
return cD + res.sprintf("%dd%02dh %02dm %02ds", days, hours, minutes, seconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ChatForm::getIsTyping()
|
|
||||||
{
|
|
||||||
return isTyping;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ChatForm::setFriendTyping(bool isTyping)
|
void ChatForm::setFriendTyping(bool isTyping)
|
||||||
{
|
{
|
||||||
chatWidget->setTypingNotificationVisible(isTyping);
|
chatWidget->setTypingNotificationVisible(isTyping);
|
||||||
|
|
|
@ -44,7 +44,6 @@ public:
|
||||||
void loadHistory(QDateTime since, bool processUndelivered = false);
|
void loadHistory(QDateTime since, bool processUndelivered = false);
|
||||||
|
|
||||||
void dischargeReceipt(int receipt);
|
void dischargeReceipt(int receipt);
|
||||||
bool getIsTyping();
|
|
||||||
void setFriendTyping(bool isTyping);
|
void setFriendTyping(bool isTyping);
|
||||||
OfflineMsgEngine* getOfflineMsgEngine();
|
OfflineMsgEngine* getOfflineMsgEngine();
|
||||||
|
|
||||||
|
|
|
@ -694,10 +694,6 @@ void Widget::onFriendStatusChanged(int friendId, Status status)
|
||||||
if (isActualChange && status != Status::Offline)
|
if (isActualChange && status != Status::Offline)
|
||||||
{ // wait a little
|
{ // wait a little
|
||||||
QTimer::singleShot(250, f->getChatForm()->getOfflineMsgEngine(), SLOT(deliverOfflineMsgs()));
|
QTimer::singleShot(250, f->getChatForm()->getOfflineMsgEngine(), SLOT(deliverOfflineMsgs()));
|
||||||
|
|
||||||
// Send another typing notification if the contact comes back online
|
|
||||||
if (f->getChatForm()->getIsTyping() && Settings::getInstance().isTypingNotificationEnabled())
|
|
||||||
Core::getInstance()->sendTyping(f->getFriendID(), true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user