Allow navigating to comments from the prompt on the submission page
This commit is contained in:
@@ -37,7 +37,9 @@ class SubredditPage(Page):
|
||||
|
||||
@SubredditController.register(Command('REFRESH'))
|
||||
def refresh_content(self, order=None, name=None):
|
||||
"Re-download all submissions and reset the page index"
|
||||
"""
|
||||
Re-download all submissions and reset the page index
|
||||
"""
|
||||
|
||||
order = order or self.content.order
|
||||
|
||||
@@ -62,7 +64,9 @@ class SubredditPage(Page):
|
||||
|
||||
@SubredditController.register(Command('SUBREDDIT_SEARCH'))
|
||||
def search_subreddit(self, name=None):
|
||||
"Open a prompt to search the given subreddit"
|
||||
"""
|
||||
Open a prompt to search the given subreddit
|
||||
"""
|
||||
|
||||
name = name or self.content.name
|
||||
|
||||
@@ -78,7 +82,9 @@ class SubredditPage(Page):
|
||||
|
||||
@SubredditController.register(Command('PROMPT'))
|
||||
def prompt_subreddit(self):
|
||||
"Open a prompt to navigate to a different subreddit"
|
||||
"""
|
||||
Open a prompt to navigate to a different subreddit"
|
||||
"""
|
||||
|
||||
name = self.term.prompt_input('Enter page: /')
|
||||
if name is not None:
|
||||
@@ -142,7 +148,9 @@ class SubredditPage(Page):
|
||||
|
||||
@SubredditController.register(Command('SUBREDDIT_OPEN_IN_BROWSER'))
|
||||
def open_link(self):
|
||||
"Open a link with the webbrowser"
|
||||
"""
|
||||
Open a link with the webbrowser
|
||||
"""
|
||||
|
||||
data = self.get_selected_item()
|
||||
if data['url_type'] == 'selfpost':
|
||||
@@ -159,7 +167,9 @@ class SubredditPage(Page):
|
||||
@SubredditController.register(Command('SUBREDDIT_POST'))
|
||||
@logged_in
|
||||
def post_submission(self):
|
||||
"Post a new submission to the given subreddit"
|
||||
"""
|
||||
Post a new submission to the given subreddit
|
||||
"""
|
||||
|
||||
# Check that the subreddit can be submitted to
|
||||
name = self.content.name
|
||||
@@ -205,7 +215,9 @@ class SubredditPage(Page):
|
||||
@SubredditController.register(Command('SUBREDDIT_OPEN_SUBSCRIPTIONS'))
|
||||
@logged_in
|
||||
def open_subscriptions(self):
|
||||
"Open user subscriptions page"
|
||||
"""
|
||||
Open user subscriptions page
|
||||
"""
|
||||
|
||||
with self.term.loader('Loading subscriptions'):
|
||||
page = SubscriptionPage(self.reddit, self.term, self.config,
|
||||
@@ -224,7 +236,9 @@ class SubredditPage(Page):
|
||||
@SubredditController.register(Command('SUBREDDIT_OPEN_MULTIREDDITS'))
|
||||
@logged_in
|
||||
def open_multireddit_subscriptions(self):
|
||||
"Open user multireddit subscriptions page"
|
||||
"""
|
||||
Open user multireddit subscriptions page
|
||||
"""
|
||||
|
||||
with self.term.loader('Loading multireddits'):
|
||||
page = SubscriptionPage(self.reddit, self.term, self.config,
|
||||
|
||||
Reference in New Issue
Block a user