Merge pull request #92 from Brobin/master

added upvote/downvote to submission view
This commit is contained in:
michael-lazar
2015-04-17 23:08:56 -07:00

View File

@@ -260,8 +260,19 @@ class SubmissionPage(BasePage):
win.addnstr(row, 1, text, n_cols)
row = len(data['split_title']) + len(split_text) + 3
text = clean(u'{score} {comments} '.format(**data))
win.addnstr(row, 1, text, n_cols, curses.A_BOLD)
text = clean(u'{score} '.format(**data))
win.addnstr(row, 1, text, n_cols - 1)
if data['likes'] is None:
text, attr = BULLET, curses.A_BOLD
elif data['likes']:
text, attr = UARROW, curses.A_BOLD | Color.GREEN
else:
text, attr = DARROW, curses.A_BOLD | Color.RED
win.addnstr(text, n_cols - win.getyx()[1], attr)
text = clean(u' {comments} '.format(**data))
win.addnstr(text, n_cols - win.getyx()[1])
if data['gold']:
text, attr = GOLD, (curses.A_BOLD | Color.YELLOW)