summaryrefslogtreecommitdiffstats
path: root/cursed.py
diff options
context:
space:
mode:
Diffstat (limited to 'cursed.py')
-rw-r--r--cursed.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cursed.py b/cursed.py
index a4c71bb..e5c17ee 100644
--- a/cursed.py
+++ b/cursed.py
@@ -29,7 +29,10 @@ class Console():
self.stdscr.addstr(self.typed_message)
self.stdscr.refresh()
- async def start(self, on_str, on_tab):
+ async def start(self, client, on_str, on_tab):
+ async for message in client.iter_messages("+46763060644", limit=10):
+ self.messages.insert(0, Message(message.raw_text, message.id, " "))
+
while True:
self.redraw()
char = await asyncio.to_thread(self.stdscr.get_wch)