Skip to content

Commit

Permalink
Fix #6
Browse files Browse the repository at this point in the history
  • Loading branch information
froggleston committed Oct 29, 2024
1 parent 006c938 commit 623b1ca
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ftui/screens/dashboard_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,19 @@ def on_mount(self) -> None:
self.register_timer(f"{self.__class__.__name__}_5sec", update_five_sec_render)

async def update_per_sec(self):
if not self.screen.is_active:
return

self.update_dashboard_all_bot_summary()

dsh_op_collap = self.query_one("#dsh-op-collap")
if dsh_op_collap.collapsed is False:
self.update_dashboard_all_open_trades()

async def update_per_five_sec(self):
if not self.screen.is_active:
return

self.update_dashboard_all_trade_summary()

dsh_cl_collap = self.query_one("#dsh-cl-collap")
Expand Down
9 changes: 9 additions & 0 deletions ftui/screens/main_bot_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ def on_mount(self) -> None:
self.register_timer(f"{self.__class__.__name__}_1min", update_one_min_render)

async def update_per_sec(self):
if not self.screen.is_active:
return

bot_id = self._get_bot_id_from_client_list()

if bot_id is not None and bot_id != "Select.BLANK":
Expand All @@ -143,6 +146,9 @@ async def update_per_sec(self):
self.update_open_trades_tab(tab_id, bot_id)

async def update_per_five_sec(self):
if not self.screen.is_active:
return

bot_id = self._get_bot_id_from_client_list()

if bot_id is not None and bot_id != "Select.BLANK":
Expand All @@ -151,6 +157,9 @@ async def update_per_five_sec(self):
getattr(self, self.TAB_FUNC_MAP[tab_id])(tab_id, bot_id)

async def update_per_one_min(self):
if not self.screen.is_active:
return

bot_id = self._get_bot_id_from_client_list()
if bot_id is not None and bot_id != "Select.BLANK":
self.update_chart(bot_id, pair=self.prev_chart_pair)
Expand Down

0 comments on commit 623b1ca

Please sign in to comment.