Changing logout prompt to a pop-up notification

This commit is contained in:
Michael Lazar
2017-09-13 01:35:29 -04:00
parent a82be10460
commit 1cf8c7b3df

View File

@@ -226,7 +226,8 @@ class Page(object):
"""
if self.reddit.is_oauth_session():
if self.term.prompt_y_or_n('Log out? (y/n): '):
ch = self.term.show_notification('Log out? (y/n)')
if ch in (ord('y'), ord('Y')):
self.oauth.clear_oauth_data()
self.term.show_notification('Logged out')
else: