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.
pull/171/head
Denis Laxalde 2020-01-26 22:20:03 +01:00 zatwierdzone przez Ivan Habunek
rodzic 69f110b474
commit 4d1fa837a1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: CDBD63C43A30BB95
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -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: