Conflicts:
	rtv/content.py
This commit is contained in:
Michael Lazar
2015-08-10 00:04:23 -07:00
2 changed files with 21 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ from .exceptions import SubredditError, AccountError
from .page import BasePage, Navigator, BaseController
from .submission import SubmissionPage
from .content import SubredditContent
from .helpers import open_browser, open_editor
from .helpers import open_browser, open_editor, strip_subreddit_url
from .docs import SUBMISSION_FILE
from .history import load_history, save_history
from .curses_helpers import (Color, LoadScreen, add_line, get_arrow, get_gold,
@@ -115,10 +115,11 @@ class SubredditPage(BasePage):
"Open a link with the webbrowser"
data = self.content.get(self.nav.absolute_index)
if data['url'] == 'selfpost':
self.open_submission()
url = data['url_full']
if data['url_type'] in ['x-post', 'selfpost']:
page = SubmissionPage(self.stdscr, self.reddit, url=url)
page.loop()
else:
url = data['url_full']
open_browser(url)
global history
history.add(url)