From eba43f21725926ecb83deeac5ed2ed05fe7b4ad3 Mon Sep 17 00:00:00 2001 From: SherlockNovitch Date: Wed, 10 Jan 2024 17:01:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/TUI/index.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/TUI/index.py b/source/TUI/index.py index 6424676..0981b75 100644 --- a/source/TUI/index.py +++ b/source/TUI/index.py @@ -1,6 +1,6 @@ +from asyncio import create_task from webbrowser import open -# from asyncio import sleep from pyperclip import paste from rich.text import Text from textual import on @@ -105,8 +105,8 @@ class Index(Screen): self.disclaimer = False @on(Button.Pressed, "#deal") - async def deal_button(self): - await self.deal() + def deal_button(self): + create_task(self.deal()) @on(Button.Pressed, "#reset") def reset_button(self): @@ -118,8 +118,6 @@ class Index(Screen): @show_state async def deal(self): - # TODO: 处理过程中,进度条异常卡顿,待排查! - # await sleep(2) if not self.url.value: self.tip.write(Text(self.prompt.invalid_link, style=WARNING)) return