Skip to content

Commit

Permalink
fix: the notification timeout was not being applied correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
cntvc committed Apr 30, 2024
1 parent 1bf5e22 commit 8711385
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions star_rail/tui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,10 @@ def notify(
*,
title: str = "",
severity: SeverityLevel = "information",
timeout: float = 3,
timeout: int, # 该参数用于widget的notify方法占位,实际并不使用
) -> None:
notification = Notification(message, title, severity, timeout=timeout)
# 通知固定显示3秒
notification = Notification(message, title=title, severity=severity, timeout=3)
self.post_message(Notify(notification))
# 模态对话框发出的通知不加入通知列表
if self.app.screen.is_modal:
Expand Down

0 comments on commit 8711385

Please sign in to comment.