Let <Esc> move back to "home" timeline

When not in overlay mode, we handle <Esc> key press to get back to the
"home" timeline. This allows to navigate quickly from another timeline
to the home one, without getting through the "go to" menu.
This commit is contained in:
Denis Laxalde 2020-01-26 22:20:03 +01:00 committed by Ivan Habunek
parent 69f110b474
commit 4d1fa837a1
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
1 changed files with 5 additions and 0 deletions

View File

@ -519,6 +519,11 @@ class TUI(urwid.Frame):
elif key == 'esc':
if self.overlay:
self.close_overlay()
elif self.timeline.name != "home":
# similar to goto_home_timeline() but without handling overlay (absent here)
self.timeline_generator = api.home_timeline_generator(
self.app, self.user, limit=40)
self.async_load_timeline(is_initial=True, timeline_name="home")
elif key in ('q', 'Q'):
if self.overlay: