page.py: inbox won't be checked if not logged in. #163

This commit is contained in:
Gustavo Zambonin
2015-10-16 21:50:40 -03:00
parent f7d6b9c299
commit 63ef032a4e

View File

@@ -443,6 +443,10 @@ class BasePage(object):
Checks the inbox for unread messages and displays a notification. 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))) inbox = len(list(self.reddit.get_unread(limit=1)))
try: try:
if inbox > 0: if inbox > 0: