plugins/time_marker: use now required poezio.ui.types

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2020-08-09 20:14:43 +02:00
parent f065fbaef9
commit 604587a5d9
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -31,6 +31,7 @@ Messages like “2 hours, 25 minutes passed…” are automatically displayed in
from poezio.plugin import BasePlugin from poezio.plugin import BasePlugin
from datetime import datetime, timedelta from datetime import datetime, timedelta
from poezio.ui.types import InfoMessage
class Plugin(BasePlugin): class Plugin(BasePlugin):
@ -72,4 +73,5 @@ class Plugin(BasePlugin):
delta = datetime.now() - last_message_date delta = datetime.now() - last_message_date
if delta >= timedelta(0, self.config.get('delay', 900)): if delta >= timedelta(0, self.config.get('delay', 900)):
tab.add_message( tab.add_message(
"%s passed…" % (format_timedelta(delta), ), str_time='') InfoMessage("%s passed…" % (format_timedelta(delta), ))
)