Skip to content

Commit

Permalink
Handling toast with .hide()
Browse files Browse the repository at this point in the history
  • Loading branch information
shashank40 committed Jul 15, 2024
1 parent 623a4c3 commit 322cd6b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions openadapt/app/tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def _quit() -> None:
# for storing toasts that should be manually removed
self.sticky_toasts = {}

# self.launch_dashboard()
self.launch_dashboard()

def stop_download(self) -> None:
"""Stops download when button clicked."""
Expand All @@ -235,9 +235,11 @@ def stop_download(self) -> None:
@Slot(str)
def download_start_toast_slot(self, message: str) -> None:
"""Shows download start toast depending on emitted signal."""
if self.download_progress_toast:
self.download_progress_toast.hide()
self.download_progress_toast = self.show_toast(
message,
duration=DOWNLOAD_TOAST_UPDATE_TIME * 1000 - 50,
duration=DOWNLOAD_TOAST_UPDATE_TIME * 1000,
always_on_main_screen=True,
reset_duration_on_hover=False,
fade_in_duration=0,
Expand Down

0 comments on commit 322cd6b

Please sign in to comment.