User's own tweets shouldn't be flagged as new (although we'll still color them unread)
This commit is contained in:
@ -17,9 +17,16 @@ class TweetPane(gtk.ScrolledWindow):
|
||||
It also gets some data from its parent, including num_entries
|
||||
'''
|
||||
|
||||
def __init__(self, list_name, num_entries=20, single_tweet=None, is_user=False, conversation=False):
|
||||
def __init__(self, list_name, username, num_entries=20, single_tweet=None, is_user=False, conversation=False):
|
||||
gtk.ScrolledWindow.__init__(self)
|
||||
|
||||
# If the username is encoded in the tweet pane's name, we really want
|
||||
# to use it instead, since it may not match the current api's name
|
||||
if re.search(r'(^| ).*/', list_name):
|
||||
self.username = re.sub(r'(list: | )(.*?)/.*$', r'\2', list_name)
|
||||
else:
|
||||
self.username = username
|
||||
|
||||
self.list_name = list_name
|
||||
self.single_tweet = single_tweet
|
||||
self.conversation = conversation
|
||||
@ -115,8 +122,9 @@ class TweetPane(gtk.ScrolledWindow):
|
||||
read = True
|
||||
if i < len(statuses):
|
||||
if statuses[i].id > self.last_tweet_read:
|
||||
self.num_new_tweets += 1
|
||||
read = False
|
||||
if statuses[i].user.screen_name != self.username:
|
||||
self.num_new_tweets += 1
|
||||
self.tweets[i].set_status(statuses[i], read)
|
||||
self.tweets[i].show()
|
||||
else:
|
||||
|
Reference in New Issue
Block a user