Indicate edited submissions/comments.
This commit is contained in:
@@ -160,6 +160,7 @@ class Content(object):
|
||||
data['stickied'] = stickied
|
||||
data['hidden'] = False
|
||||
data['saved'] = comment.saved
|
||||
data['edited'] = '*' if comment.edited else ''
|
||||
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
|
||||
@@ -189,6 +190,7 @@ class Content(object):
|
||||
data['author'] = author
|
||||
data['flair'] = flair
|
||||
data['hidden'] = False
|
||||
data['edited'] = '*' if comment.edited else ''
|
||||
|
||||
return data
|
||||
|
||||
@@ -234,6 +236,7 @@ class Content(object):
|
||||
data['xpost_subreddit'] = None
|
||||
data['index'] = None # This is filled in later by the method caller
|
||||
data['saved'] = sub.saved
|
||||
data['edited'] = '*' if sub.edited else ''
|
||||
|
||||
if sub.url.split('/r/')[-1] == sub.permalink.split('/r/')[-1]:
|
||||
data['url'] = 'self.{0}'.format(data['subreddit'])
|
||||
|
||||
@@ -340,7 +340,8 @@ class SubmissionPage(Page):
|
||||
|
||||
attr = self.term.attr('Created')
|
||||
self.term.add_space(win)
|
||||
self.term.add_line(win, '{created}'.format(**data), attr=attr)
|
||||
self.term.add_line(win, '{created}{edited}'.format(**data),
|
||||
attr=attr)
|
||||
|
||||
if data['gold']:
|
||||
attr = self.term.attr('Gold')
|
||||
@@ -411,7 +412,8 @@ class SubmissionPage(Page):
|
||||
|
||||
attr = self.term.attr('Created')
|
||||
self.term.add_space(win)
|
||||
self.term.add_line(win, '{created_long}'.format(**data), attr=attr)
|
||||
self.term.add_line(win, '{created_long}{edited}'.format(**data),
|
||||
attr=attr)
|
||||
|
||||
row = len(data['split_title']) + 2
|
||||
if data['url_full'] in self.config.history:
|
||||
|
||||
@@ -353,7 +353,8 @@ class SubredditPage(Page):
|
||||
self.term.add_space(win)
|
||||
|
||||
attr = self.term.attr('Created')
|
||||
self.term.add_line(win, '{created}'.format(**data), attr=attr)
|
||||
self.term.add_line(win, '{created}{edited}'.format(**data),
|
||||
attr=attr)
|
||||
|
||||
if data['comments'] is not None:
|
||||
attr = self.term.attr('Separator')
|
||||
|
||||
Reference in New Issue
Block a user