From 8462711fc6a3d86b9c67edd89a20b5fdedc02240 Mon Sep 17 00:00:00 2001
From: mathieui <mathieui@mathieui.net>
Date: Mon, 25 May 2020 22:41:04 +0200
Subject: Do not add the date in history messages from the current day

---
 poezio/ui/render.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/poezio/ui/render.py b/poezio/ui/render.py
index c85d3cc5..633ac2a0 100644
--- a/poezio/ui/render.py
+++ b/poezio/ui/render.py
@@ -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
-- 
cgit v1.2.3