page.py: inbox won't be checked if not logged in. #163
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user