Fixed conversation list navigation when list is empty

This commit is contained in:
Mark Qvist 2021-05-19 09:26:12 +02:00
parent 53139c25f9
commit 56f4f20bb2
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
__version__ = "0.0.3" __version__ = "0.0.4"

View File

@ -31,7 +31,7 @@ class ConversationsArea(urwid.LineBox):
self.delegate.new_conversation() self.delegate.new_conversation()
elif key == "tab": elif key == "tab":
self.delegate.app.ui.main_display.frame.set_focus("header") self.delegate.app.ui.main_display.frame.set_focus("header")
elif key == "up" and self.delegate.ilb.first_item_is_selected(): elif key == "up" and (self.delegate.ilb.first_item_is_selected() or self.delegate.ilb.body_is_empty()):
self.delegate.app.ui.main_display.frame.set_focus("header") self.delegate.app.ui.main_display.frame.set_focus("header")
else: else:
return super(ConversationsArea, self).keypress(size, key) return super(ConversationsArea, self).keypress(size, key)