changeset 1967:de6faf9be715 refacoring_messages

primitivus (chat): fixed filters clearing when changing filter while one already exists
author Goffi <goffi@goffi.org>
date Mon, 20 Jun 2016 23:07:53 +0200
parents d727aab9a80e
children 5fbe09b9b568
files frontends/src/primitivus/chat.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/primitivus/chat.py	Mon Jun 20 19:19:16 2016 +0200
+++ b/frontends/src/primitivus/chat.py	Mon Jun 20 23:07:53 2016 +0200
@@ -276,12 +276,11 @@
             empty list to clear all filters
             only lang=XX is handled for now
         """
+        del self.filters[:]
         if args:
             if args[0].startswith("lang="):
                 lang = args[0][5:].strip()
                 self.filters.append(lambda mess_data: lang in mess_data.message)
-        else:
-            del self.filters[:]
 
         del self.mess_walker[:]
         for message in self.messages.itervalues():