summaryrefslogtreecommitdiff
path: root/poezio/tabs/basetabs.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-05-23 16:38:05 +0200
committermathieui <mathieui@mathieui.net>2020-05-23 16:38:05 +0200
commite48780ddf0a6a80e0c36eaa8f8165c8d14ad63b1 (patch)
tree534654be974749c2f4ea0bc99451fb8da5c61843 /poezio/tabs/basetabs.py
parent4c1ab027ac03ae3f0925eab03f43a5ad79d906d5 (diff)
parentfaeab78c7e3c9f125cfbfe3dce0fb18c9b8649c4 (diff)
downloadpoezio-e48780ddf0a6a80e0c36eaa8f8165c8d14ad63b1.tar.gz
poezio-e48780ddf0a6a80e0c36eaa8f8165c8d14ad63b1.tar.bz2
poezio-e48780ddf0a6a80e0c36eaa8f8165c8d14ad63b1.tar.xz
poezio-e48780ddf0a6a80e0c36eaa8f8165c8d14ad63b1.zip
Merge branch 'fix-history-fetch' into 'master'
Fix many MAM issues Closes #3516, #3496, #3498, #3506, #3522, and #3493 See merge request poezio/poezio!105
Diffstat (limited to 'poezio/tabs/basetabs.py')
-rw-r--r--poezio/tabs/basetabs.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index fbb0c4cf..a42ee41b 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -32,7 +32,6 @@ from typing import (
)
from poezio import (
- mam,
poopt,
timed_events,
xhtml,
@@ -493,12 +492,11 @@ class ChatTab(Tab):
self._jid = jid
#: Is the tab currently requesting MAM data?
self.query_status = False
- self.last_stanza_id = None
-
self._name = jid.full # type: Optional[str]
- self.text_win = None
+ self.text_win = windows.TextWin()
self.directed_presence = None
self._text_buffer = TextBuffer()
+ self._text_buffer.add_window(self.text_win)
self.chatstate = None # can be "active", "composing", "paused", "gone", "inactive"
# We keep a reference of the event that will set our chatstate to "paused", so that
# we can delete it or change it if we need to
@@ -926,7 +924,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):