diff options
author | Maxime “pep” Buquet <pep@bouah.net> | 2020-08-14 22:12:16 +0200 |
---|---|---|
committer | Maxime “pep” Buquet <pep@bouah.net> | 2020-08-14 22:12:26 +0200 |
commit | 03ef9c8d547872ae7aa87ecec4779bca49309225 (patch) | |
tree | 547dca2f342f7f102ec1f6e2d20776ce78bc1974 /poezio/ui/render.py | |
parent | 96f3bd72ac2704534388d993f644ec55abdf31b2 (diff) | |
download | poezio-03ef9c8d547872ae7aa87ecec4779bca49309225.tar.gz poezio-03ef9c8d547872ae7aa87ecec4779bca49309225.tar.bz2 poezio-03ef9c8d547872ae7aa87ecec4779bca49309225.tar.xz poezio-03ef9c8d547872ae7aa87ecec4779bca49309225.zip |
move date and time SHORT_FORMAT and LONG_FORMAT to the theme
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
Diffstat (limited to 'poezio/ui/render.py')
-rw-r--r-- | poezio/ui/render.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/poezio/ui/render.py b/poezio/ui/render.py index 633ac2a0..f37ea39e 100644 --- a/poezio/ui/render.py +++ b/poezio/ui/render.py @@ -18,8 +18,6 @@ from poezio.theming import ( ) from poezio.ui.consts import ( FORMAT_CHAR, - LONG_FORMAT, - SHORT_FORMAT, ) from poezio.ui.funcs import ( truncate_nick, @@ -237,11 +235,12 @@ class PreMessageHelpers: """ Write the date on the yth line of the window """ + theme = get_theme() if time: if history and time.date() != date.today(): - format = LONG_FORMAT + format = theme.LONG_TIME_FORMAT else: - format = SHORT_FORMAT + format = theme.SHORT_TIME_FORMAT time_str = time.strftime(format) color = get_theme().COLOR_TIME_STRING with buffer.colored_text(color=color): |