fix 'j' on MucListTab when row number 0 is selected
This commit is contained in:
parent
9671db5980
commit
190fc0a1f7
3 changed files with 5 additions and 5 deletions
|
@ -111,8 +111,6 @@ class Room(TextBuffer):
|
|||
self.color_state != theme.COLOR_TAB_CURRENT:
|
||||
if self.color_state != theme.COLOR_TAB_HIGHLIGHT:
|
||||
self.set_color_state(theme.COLOR_TAB_NEW_MESSAGE)
|
||||
# elif self.jid:
|
||||
# self.set_color_state(theme.COLOR_TAB_PRIVATE)
|
||||
if not nickname:
|
||||
color = theme.COLOR_INFORMATION_TEXT
|
||||
else:
|
||||
|
|
|
@ -989,8 +989,10 @@ class MucListTab(Tab):
|
|||
return
|
||||
|
||||
def join_selected(self):
|
||||
jid = self.listview.get_selected_row()['jid']
|
||||
self.core.command_join(jid)
|
||||
row = self.listview.get_selected_row()
|
||||
if not row:
|
||||
return
|
||||
self.core.command_join(row['jid'])
|
||||
|
||||
def reset_help_message(self, _=None):
|
||||
curses.curs_set(0)
|
||||
|
|
|
@ -1307,7 +1307,7 @@ class ListWin(Win):
|
|||
"""
|
||||
Return the tuple representing the selected row
|
||||
"""
|
||||
if self._selected_row:
|
||||
if self._selected_row is not None:
|
||||
return self.lines[self._selected_row]
|
||||
return None
|
||||
|
||||
|
|
Loading…
Reference in a new issue