diff options
author | Ryan Huber <rhuber@gmail.com> | 2015-11-14 00:47:57 +0000 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2015-11-14 00:47:57 +0000 |
commit | 092a76928bb42970a88a7a7aaea425a4a59c9488 (patch) | |
tree | 0286ff23d5b52f9ee10cf3b35c51332df65952c6 /wee_slack.py | |
parent | 7f80c380eadf0c1e59418d014db24330df72dae0 (diff) | |
download | wee-slack-092a76928bb42970a88a7a7aaea425a4a59c9488.tar.gz |
don't update typing status for hidden buffers
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 18 |
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): |