added max column width for comments
This commit is contained in:
@@ -25,10 +25,12 @@ class SubmissionPage(Page):
|
|||||||
self.controller = SubmissionController(self, keymap=config.keymap)
|
self.controller = SubmissionController(self, keymap=config.keymap)
|
||||||
|
|
||||||
if url:
|
if url:
|
||||||
self.content = SubmissionContent.from_url(reddit, url, term.loader,
|
self.content = SubmissionContent.from_url(
|
||||||
|
reddit, url, term.loader,
|
||||||
max_comment_cols=config['max_comment_cols'])
|
max_comment_cols=config['max_comment_cols'])
|
||||||
else:
|
else:
|
||||||
self.content = SubmissionContent(submission, term.loader,
|
self.content = SubmissionContent(
|
||||||
|
submission, term.loader,
|
||||||
max_comment_cols=config['max_comment_cols'])
|
max_comment_cols=config['max_comment_cols'])
|
||||||
# Start at the submission post, which is indexed as -1
|
# Start at the submission post, which is indexed as -1
|
||||||
self.nav = Navigator(self.content.get, page_index=-1)
|
self.nav = Navigator(self.content.get, page_index=-1)
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ class SubredditPage(Page):
|
|||||||
|
|
||||||
# Check that the subreddit can be submitted to
|
# Check that the subreddit can be submitted to
|
||||||
name = self.content.name
|
name = self.content.name
|
||||||
if '+' in name or name in ('/r/all', '/r/front', '/r/me','/u/saved'):
|
if '+' in name or name in ('/r/all', '/r/front', '/r/me', '/u/saved'):
|
||||||
self.term.show_notification("Can't post to {0}".format(name))
|
self.term.show_notification("Can't post to {0}".format(name))
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -272,4 +272,4 @@ class SubredditPage(Page):
|
|||||||
self.term.add_line(win, text, attr=Color.YELLOW)
|
self.term.add_line(win, text, attr=Color.YELLOW)
|
||||||
if data['flair']:
|
if data['flair']:
|
||||||
text = ' {flair}'.format(**data)
|
text = ' {flair}'.format(**data)
|
||||||
self.term.add_line(win, text, attr=Color.RED)
|
self.term.add_line(win, text, attr=Color.RED)
|
||||||
Reference in New Issue
Block a user