Commit d174e1fa authored by mathieui's avatar mathieui

MAM: many changes

- Fix color & nicks in one to one chats
- Make poezio-facing functions "schedules" to avoid races on tab query
  state
- Rename functions
- Use a different behavior when filling a history gap and populating a
  new tab in a MUC
parent 54339ee7
This diff is collapsed.
......@@ -32,7 +32,6 @@ from typing import (
)
from poezio import (
mam,
poopt,
timed_events,
xhtml,
......@@ -926,7 +925,8 @@ class ChatTab(Tab):
def on_scroll_up(self):
if not self.query_status:
asyncio.ensure_future(mam.on_scroll_up(tab=self))
from poezio import mam
mam.schedule_scroll_up(tab=self)
return self.text_win.scroll_up(self.text_win.height - 1)
def on_scroll_down(self):
......
......@@ -170,7 +170,7 @@ class MucTab(ChatTab):
status=status.message,
show=status.show,
seconds=seconds)
asyncio.ensure_future(mam.on_tab_open(self))
mam.schedule_tab_open(self)
def leave_room(self, message: str):
if self.joined:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment