diff options
Diffstat (limited to 'poezio/tabs/muclisttab.py')
-rw-r--r-- | poezio/tabs/muclisttab.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/poezio/tabs/muclisttab.py b/poezio/tabs/muclisttab.py index aac25787..53fce727 100644 --- a/poezio/tabs/muclisttab.py +++ b/poezio/tabs/muclisttab.py @@ -4,6 +4,7 @@ A MucListTab is a tab listing the rooms on a conference server. It has no functionality except scrolling the list, and allowing the user to join the rooms. """ +import asyncio import logging from typing import Dict, Callable @@ -20,8 +21,8 @@ class MucListTab(ListTab): A tab listing rooms from a specific server, displaying various information, scrollable, and letting the user join them, etc """ - plugin_commands = {} # type: Dict[str, Command] - plugin_keys = {} # type: Dict[str, Callable] + plugin_commands: Dict[str, Command] = {} + plugin_keys: Dict[str, Callable] = {} def __init__(self, core, server): ListTab.__init__(self, core, server.full, "ājā: join room.", @@ -60,6 +61,7 @@ class MucListTab(ListTab): items = [(item[0].split('@')[0], item[0], item[2] or '', '') for item in get_items()] + items = sorted(items, key=lambda item: item[0]) self.listview.set_lines(items) self.info_header.message = 'Chatroom list on server %s' % self.name if self.core.tabs.current_tab is self: @@ -73,4 +75,4 @@ class MucListTab(ListTab): row = self.listview.get_selected_row() if not row: return - self.core.command.join(row[1]) + asyncio.ensure_future(self.core.command.join(row[1])) |