From 63ef032a4e99bcc85fa9ae15c7d48d395973325f Mon Sep 17 00:00:00 2001 From: Gustavo Zambonin Date: Fri, 16 Oct 2015 21:50:40 -0300 Subject: [PATCH] page.py: inbox won't be checked if not logged in. #163 --- rtv/page.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rtv/page.py b/rtv/page.py index 0c9b8d7..ca02500 100644 --- a/rtv/page.py +++ b/rtv/page.py @@ -443,6 +443,10 @@ class BasePage(object): Checks the inbox for unread messages and displays a notification. """ + if not self.reddit.is_oauth_session(): + show_notification(self.stdscr, ['Not logged in']) + return + inbox = len(list(self.reddit.get_unread(limit=1))) try: if inbox > 0: