From 492e54b44bbd4624b818e3c090fc173beb371e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E5=8C=85=E5=AD=90?= Date: Thu, 14 Mar 2024 17:48:30 +0000 Subject: [PATCH] =?UTF-8?q?update=20DownloadNotification/entry/src/main/et?= =?UTF-8?q?s/pages/MainPage.ets.=20notification.cancel()=20=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=9A=84=E6=98=AF=E4=B8=AA=20Promise=20=20?= =?UTF-8?q?=E8=BF=99=E9=87=8C=E4=B8=8D=E5=8A=A0=20await=20=20=E4=BC=9A?= =?UTF-8?q?=E5=90=9E=E6=8E=89=20cancel=20=E7=9A=84=E5=BC=82=E5=B8=B8=20;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 水包子 --- DownloadNotification/entry/src/main/ets/pages/MainPage.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DownloadNotification/entry/src/main/ets/pages/MainPage.ets b/DownloadNotification/entry/src/main/ets/pages/MainPage.ets index 7ed7a568..b8985a8c 100644 --- a/DownloadNotification/entry/src/main/ets/pages/MainPage.ets +++ b/DownloadNotification/entry/src/main/ets/pages/MainPage.ets @@ -194,7 +194,7 @@ struct MainPage { this.downloadProgress = 0; clearInterval(this.interval); this.downloadStatus = DOWNLOAD_STATUS.INITIAL; - notification.cancel(CommonConstants.NOTIFICATION_ID); + await notification.cancel(CommonConstants.NOTIFICATION_ID); } /** -- Gitee