/r/front now displayed as "Front Page".
This commit is contained in:
@@ -155,13 +155,15 @@ class BasePage(object):
|
||||
self._header_window.erase()
|
||||
attr = curses.A_REVERSE | curses.A_BOLD | Color.CYAN
|
||||
self._header_window.bkgd(' ', attr)
|
||||
self._header_window.addnstr(0, 0, self.content.name, n_cols-1)
|
||||
|
||||
sub_name = self.content.name.replace('/r/front', 'Front Page ')
|
||||
self._header_window.addnstr(0, 0, sub_name, n_cols-1)
|
||||
|
||||
if self.reddit.user is not None:
|
||||
username = self.reddit.user.name
|
||||
s_col = (n_cols - len(username) - 1)
|
||||
# Only print the username if it fits in the empty space on the right
|
||||
if (s_col - 1) >= len(self.content.name):
|
||||
if (s_col - 1) >= len(sub_name):
|
||||
self._header_window.addnstr(0, s_col, username, (n_cols-s_col-1))
|
||||
|
||||
self._header_window.refresh()
|
||||
|
||||
Reference in New Issue
Block a user