fix notification duplicate bug
authorvunhat_minh <vunhat_minh@dwango.co.jp>
Fri, 12 Sep 2014 03:50:57 +0000 (12:50 +0900)
committervunhat_minh <vunhat_minh@dwango.co.jp>
Fri, 12 Sep 2014 03:50:57 +0000 (12:50 +0900)
docs/conf.py
rainbowstream/rainbow.py
setup.py

index dfa7d32..ad07f8a 100644 (file)
@@ -48,9 +48,9 @@ copyright = u'2014, Vu Nhat Minh'
 # built documents.
 #
 # The short X.Y version.
-version = '1.0.1'
+version = '1.0.2'
 # The full version, including alpha/beta/rc tags.
-release = '1.0.1'
+release = '1.0.2'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
index 6a565f9..dd7fffc 100644 (file)
@@ -168,14 +168,12 @@ def init(args):
     g['themes'] = themes
     g['pause'] = False
     g['message_threads'] = {}
-    # Events
-    g['events'] = []
     # Startup cmd
     g['cmd'] = ''
     # Debug option default = True
     g['debug'] = True
     g['traceback'] = []
-    # Retweet of mine events
+    # Events
     c['events'] = []
     # Semaphore init
     c['lock'] = False
@@ -242,9 +240,8 @@ def notification():
     """
     Show notifications
     """
-    g['events'] = g['events'] + c['events']
-    if g['events']:
-        for e in g['events']:
+    if c['events']:
+        for e in c['events']:
             print_event(e)
         printNicely('')
     else:
@@ -1901,7 +1898,7 @@ def stream(domain, args, name='Rainbow Stream'):
                     time.sleep(0.5)
                 print_message(tweet['direct_message'])
             elif tweet.get('event'):
-                g['events'].append(tweet)
+                c['events'].append(tweet)
                 print_event(tweet)
     except TwitterHTTPError:
         printNicely('')
index ecadbcd..72076ae 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ import os
 import os.path
 
 # Bumped version
-version = '1.0.1'
+version = '1.0.2'
 
 # Require
 install_requires = [