summaryrefslogtreecommitdiff
path: root/poezio/ui
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-05-22 01:55:32 +0200
committermathieui <mathieui@mathieui.net>2020-05-23 16:10:13 +0200
commit36c85a5df4fc4650956bc3aa9d4e8474268a06a9 (patch)
treec15ae33a8fd745fda0e0ea70bb8bc25948985e93 /poezio/ui
parentd174e1fa352dd5b8c479a71123ab25a7371dd5bd (diff)
downloadpoezio-36c85a5df4fc4650956bc3aa9d4e8474268a06a9.tar.gz
poezio-36c85a5df4fc4650956bc3aa9d4e8474268a06a9.tar.bz2
poezio-36c85a5df4fc4650956bc3aa9d4e8474268a06a9.tar.xz
poezio-36c85a5df4fc4650956bc3aa9d4e8474268a06a9.zip
Add an "end of archive" message type
Diffstat (limited to 'poezio/ui')
-rw-r--r--poezio/ui/types.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/poezio/ui/types.py b/poezio/ui/types.py
index 34924112..15117275 100644
--- a/poezio/ui/types.py
+++ b/poezio/ui/types.py
@@ -12,6 +12,7 @@ from poezio.ui.consts import (
)
+
class BaseMessage:
__slots__ = ('txt', 'time', 'identifier')
@@ -27,6 +28,10 @@ class BaseMessage:
return SHORT_FORMAT_LENGTH + 1
+class EndOfArchive(BaseMessage):
+ """Marker added to a buffer when we reach the end of a MAM archive"""
+
+
class InfoMessage(BaseMessage):
def __init__(self, txt: str, identifier: str = '', time: Optional[datetime] = None):
txt = ('\x19%s}' % dump_tuple(get_theme().COLOR_INFORMATION_TEXT)) + txt