Added a [Comment] tag to the subreddit view and added cassettes
This commit is contained in:
@@ -159,7 +159,7 @@ class Content(object):
|
||||
else:
|
||||
# Saved comments don't have a nested level and are missing a couple
|
||||
# of fields like ``submission``. As a result, we can only load a
|
||||
# subset of fields to avoid triggering a seperate api call to load
|
||||
# subset of fields to avoid triggering a separate api call to load
|
||||
# the full comment.
|
||||
author = getattr(comment, 'author', '[deleted]')
|
||||
stickied = getattr(comment, 'stickied', False)
|
||||
@@ -167,8 +167,8 @@ class Content(object):
|
||||
|
||||
data['type'] = 'SavedComment'
|
||||
data['level'] = None
|
||||
data['title'] = comment.body
|
||||
data['comments'] = ''
|
||||
data['title'] = '[Comment] {0}'.format(comment.body)
|
||||
data['comments'] = None
|
||||
data['url_full'] = comment._fast_permalink
|
||||
data['url'] = comment._fast_permalink
|
||||
data['permalink'] = comment._fast_permalink
|
||||
|
||||
@@ -260,9 +260,11 @@ class SubredditPage(Page):
|
||||
text, attr = self.term.get_arrow(data['likes'])
|
||||
self.term.add_line(win, text, attr=attr)
|
||||
self.term.add_line(win, ' {created} '.format(**data))
|
||||
text, attr = '-', curses.A_BOLD
|
||||
self.term.add_line(win, text, attr=attr)
|
||||
self.term.add_line(win, ' {comments} '.format(**data))
|
||||
|
||||
if data['comments'] is not None:
|
||||
text, attr = '-', curses.A_BOLD
|
||||
self.term.add_line(win, text, attr=attr)
|
||||
self.term.add_line(win, ' {comments} '.format(**data))
|
||||
|
||||
if data['saved']:
|
||||
text, attr = '[saved]', Color.GREEN
|
||||
|
||||
Reference in New Issue
Block a user