Merge branch 'display-today-history-without-date' into 'master'
Do not add the date in history messages from the current day See merge request poezio/poezio!126
This commit is contained in:
commit
6943506fd3
1 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,9 @@
|
||||||
import curses
|
import curses
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import (
|
||||||
|
datetime,
|
||||||
|
date,
|
||||||
|
)
|
||||||
from functools import singledispatch
|
from functools import singledispatch
|
||||||
from math import ceil, log10
|
from math import ceil, log10
|
||||||
from typing import (
|
from typing import (
|
||||||
|
@ -235,7 +238,7 @@ class PreMessageHelpers:
|
||||||
Write the date on the yth line of the window
|
Write the date on the yth line of the window
|
||||||
"""
|
"""
|
||||||
if time:
|
if time:
|
||||||
if history:
|
if history and time.date() != date.today():
|
||||||
format = LONG_FORMAT
|
format = LONG_FORMAT
|
||||||
else:
|
else:
|
||||||
format = SHORT_FORMAT
|
format = SHORT_FORMAT
|
||||||
|
|
Loading…
Reference in a new issue