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

View file

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