Permalink
Browse files

Don't keep showing the same message over again if you don't mark it a…

…s read
  • Loading branch information...
1 parent 3ec48f6 commit 94e24a999c115a4093dbc4738650c1510571cdd0 @davekeogh committed Sep 6, 2009
Showing with 4 additions and 1 deletion.
  1. +4 −1 reddit_monitor
View
@@ -296,9 +296,12 @@ class Application(object):
self.tray_icon.menu.ui_manager.get_widget('/TrayMenu/Refresh').set_sensitive(False)
def check():
+ messages_len = len(self.messages)
+
self.karma, self.comment_karma = self.reddit.get_karma()
self.messages = self.reddit.get_new_mail()
- if self.messages:
+
+ if len(self.messages) > messages_len:
self.tray_icon.set_icon(self.resources['new_mail_icon'])
self.show_notification()
self.play_sound()

0 comments on commit 94e24a9

Please sign in to comment.