Do not add the date in history messages from the current day

This commit is contained in:
mathieui 2020-05-25 22:41:04 +02:00
parent ec6c1bf81a
commit 8462711fc6

View file

@ -1,6 +1,9 @@
import curses
from datetime import datetime
from datetime import (
datetime,
date,
)
from functools import singledispatch
from math import ceil, log10
from typing import (
@ -235,7 +238,7 @@ class PreMessageHelpers:
Write the date on the yth line of the window
"""
if time:
if history:
if history and time.date() != date.today():
format = LONG_FORMAT
else:
format = SHORT_FORMAT