Fixed behavior for opening x-posts. #173

This commit is contained in:
Michael Lazar
2015-12-03 23:16:25 -08:00
parent 6f0773df31
commit 761bd7d6a2

View File

@@ -90,7 +90,7 @@ class SubredditPage(Page):
page.loop() page.loop()
if data.get('url_type') in ('selfpost', 'x-post'): if data.get('url_type') == 'selfpost':
self.config.history.add(data['url_full']) self.config.history.add(data['url_full'])
@SubredditController.register(curses.KEY_ENTER, Terminal.RETURN, 'o') @SubredditController.register(curses.KEY_ENTER, Terminal.RETURN, 'o')
@@ -98,9 +98,11 @@ class SubredditPage(Page):
"Open a link with the webbrowser" "Open a link with the webbrowser"
data = self.content.get(self.nav.absolute_index) data = self.content.get(self.nav.absolute_index)
if data['url_type'] in ('x-post', 'selfpost'): if data['url_type'] == 'selfpost':
# Open links to other posts directly in RTV
self.open_submission() self.open_submission()
elif data['url_type'] == 'x-post':
self.open_submission(url=data['url_full'])
self.config.history.add(data['url_full'])
else: else:
self.term.open_browser(data['url_full']) self.term.open_browser(data['url_full'])
self.config.history.add(data['url_full']) self.config.history.add(data['url_full'])