aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2015-11-14 00:47:57 +0000
committerRyan Huber <rhuber@gmail.com>2015-11-14 00:47:57 +0000
commit092a76928bb42970a88a7a7aaea425a4a59c9488 (patch)
tree0286ff23d5b52f9ee10cf3b35c51332df65952c6 /wee_slack.py
parent7f80c380eadf0c1e59418d014db24330df72dae0 (diff)
downloadwee-slack-092a76928bb42970a88a7a7aaea425a4a59c9488.tar.gz
don't update typing status for hidden buffers
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/wee_slack.py b/wee_slack.py
index a7b0abe..e83f0ba 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -446,15 +446,17 @@ class Channel(object):
self.active = False
def set_typing(self, user):
- self.typing[user] = time.time()
- buffer_list_update_next()
+ if w.buffer_get_integer(self.channel_buffer, "hidden") == 0:
+ self.typing[user] = time.time()
+ buffer_list_update_next()
def unset_typing(self, user):
- try:
- del self.typing[user]
- buffer_list_update_next()
- except:
- pass
+ if w.buffer_get_integer(self.channel_buffer, "hidden") == 0:
+ try:
+ del self.typing[user]
+ buffer_list_update_next()
+ except:
+ pass
def send_message(self, message):
message = self.linkify_text(message)
@@ -514,7 +516,7 @@ class Channel(object):
return True
if len(self.typing) > 0:
self.typing = {}
- buffer_list_update_next()
+ #buffer_list_update_next()
return False
def get_typing_list(self):