[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:22:07 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=04a4198
The following commit has been merged in the master branch:
commit 04a419887ba7102726ae4168294da613ea58a6e2
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date: Wed Jul 18 14:58:33 2012 +0200
Don't spam the channel with Composing state if the state actually hasn't changed
This fixes delays in messages with some accounts like ICQ/AIM, however if user sends quickly too many messages,
they will still be delayed (by libpurple), just considerably less. Now we're on par with Empathy and Kopete,
that's all we can do about it.
Reviewed-by: George Kiagiadakis
BUG: 300655
FIXED-IN: 0.4.1
---
lib/chat-widget.cpp | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
index e3439d8..e30d7b5 100644
--- a/lib/chat-widget.cpp
+++ b/lib/chat-widget.cpp
@@ -862,13 +862,21 @@ void ChatWidget::onChannelInvalidated()
void ChatWidget::onInputBoxChanged()
{
//if the box is empty
- bool textBoxEmpty = !d->ui.sendMessageBox->toPlainText().isEmpty();
+ bool textBoxEmpty = d->ui.sendMessageBox->toPlainText().isEmpty();
- //FIXME buffer what we've sent to telepathy, make this more efficient.
- if(textBoxEmpty) {
+ //if the timer is active, it means the user is continuously typing
+ if (d->pausedStateTimer->isActive()) {
+ //just restart the timer and don't spam with chat state changes
+ d->pausedStateTimer->start(5000);
+ return;
+ }
+
+ if(!textBoxEmpty) {
+ //if the user has typed some text, set state to Composing and start the timer
d->channel->requestChatState(Tp::ChannelChatStateComposing);
d->pausedStateTimer->start(5000);
} else {
+ //if the user typed no text/cleared the input field, set Active and stop the timer
d->channel->requestChatState(Tp::ChannelChatStateActive);
d->pausedStateTimer->stop();
}
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list