Load followed accounts after timeline

This way we don't have to wait for them to load, which may take a while
due to paging.
This commit is contained in:
Ivan Habunek 2023-11-19 09:12:42 +01:00
parent 9808784645
commit ef19449190
No known key found for this signature in database
GPG Key ID: F5F0623FF5EBCB3D
1 changed files with 2 additions and 1 deletions

View File

@ -137,14 +137,15 @@ class TUI(urwid.Frame):
self.exception = None
self.can_translate = False
self.account = None
self.followed_accounts = []
super().__init__(self.body, header=self.header, footer=self.footer)
def run(self):
self.loop.set_alarm_in(0, lambda *args: self.async_load_instance())
self.loop.set_alarm_in(0, lambda *args: self.async_load_followed_accounts())
self.loop.set_alarm_in(0, lambda *args: self.async_load_timeline(
is_initial=True, timeline_name="home"))
self.loop.set_alarm_in(0, lambda *args: self.async_load_followed_accounts())
self.loop.run()
self.executor.shutdown(wait=False)