summaryrefslogtreecommitdiff
path: root/poezio
diff options
context:
space:
mode:
authorMadhur Garg <madhurgarg96@gmail.com>2019-08-21 03:06:41 +0530
committerMadhur Garg <madhurgarg96@gmail.com>2019-08-22 00:54:25 +0530
commitb01c7965519dadb5e0c566db3da340648276744b (patch)
treeede6c40b741c881599c44a0fe47be917ff415dfd /poezio
parente3c1ac4033b3f9f2888e494aa6ab459a2e4c52c2 (diff)
downloadpoezio-b01c7965519dadb5e0c566db3da340648276744b.tar.gz
poezio-b01c7965519dadb5e0c566db3da340648276744b.tar.bz2
poezio-b01c7965519dadb5e0c566db3da340648276744b.tar.xz
poezio-b01c7965519dadb5e0c566db3da340648276744b.zip
Corrected indentation and coding style.
Diffstat (limited to 'poezio')
-rw-r--r--poezio/core/core.py3
-rw-r--r--poezio/mam.py5
-rw-r--r--poezio/text_buffer.py10
3 files changed, 8 insertions, 10 deletions
diff --git a/poezio/core/core.py b/poezio/core/core.py
index b195fb4e..55b04221 100644
--- a/poezio/core/core.py
+++ b/poezio/core/core.py
@@ -1996,9 +1996,8 @@ class Core:
tab = self.tabs.by_name_and_class(bm.jid, tabs.MucTab)
nick = bm.nick if bm.nick else self.own_nick
if not tab:
- self.open_new_room(
+ tab = self.open_new_room(
bm.jid, nick, focus=False, password=bm.password)
- tab = self.tabs.by_name_and_class(bm.jid, tabs.MucTab)
self.initial_joins.append(bm.jid)
# do not join rooms that do not have autojoin
# but display them anyway
diff --git a/poezio/mam.py b/poezio/mam.py
index 4c8f3309..d928a735 100644
--- a/poezio/mam.py
+++ b/poezio/mam.py
@@ -153,14 +153,13 @@ def mam_scroll(tab):
end = end.replace(tzinfo=tzone).astimezone(tz=timezone.utc)
end = end.replace(tzinfo=None)
end = datetime.strftime(end, '%Y-%m-%dT%H:%M:%SZ')
- top = True
pos = tab.text_win.pos
tab.text_win.pos += tab.text_win.height - 1
if tab.text_win.pos + tab.text_win.height > len(tab.text_win.built_lines):
if before is None:
- asyncio.ensure_future(query(tab, remote_jid, top, end=end))
+ asyncio.ensure_future(query(tab, remote_jid, top=True, end=end))
else:
- asyncio.ensure_future(query(tab, remote_jid, top, before=before))
+ asyncio.ensure_future(query(tab, remote_jid, top=True, before=before))
tab.query_id = 1
tab.text_win.pos = len(tab.text_win.built_lines) - tab.text_win.height
if tab.text_win.pos < 0:
diff --git a/poezio/text_buffer.py b/poezio/text_buffer.py
index 64bc17f6..3d1f8266 100644
--- a/poezio/text_buffer.py
+++ b/poezio/text_buffer.py
@@ -169,12 +169,12 @@ class TextBuffer:
nick_size = config.get('max_nick_length')
for window in self._windows: # make the associated windows
# build the lines from the new message
- if top == True:
+ if top:
nb = window.build_message_at_the_top(
- msg,
- history=history,
- timestamp=show_timestamps,
- nick_size=nick_size)
+ msg,
+ history=history,
+ timestamp=show_timestamps,
+ nick_size=nick_size)
if ret_val == 0:
ret_val = nb
if window.pos != 0: