From 8d1987d1c996480fdd7aefa7f9798adcb3b498f1 Mon Sep 17 00:00:00 2001 From: orz12 Date: Fri, 8 Mar 2024 14:20:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=93=E5=AD=98=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/about/index.dart | 7 ++----- lib/utils/cache_manage.dart | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/pages/about/index.dart b/lib/pages/about/index.dart index 2c0ab5b3..af1a4d6b 100644 --- a/lib/pages/about/index.dart +++ b/lib/pages/about/index.dart @@ -164,11 +164,8 @@ class _AboutPageState extends State { ), ListTile( onTap: () async { - var cleanStatus = await CacheManage().clearCacheAll(); - if (cleanStatus) { - getCacheSize(); - SmartDialog.showToast('清除成功'); - } + await CacheManage().clearCacheAll(); + getCacheSize(); }, title: const Text('清除缓存'), subtitle: Text('图片及网络缓存 $cacheSize', style: subTitleStyle), diff --git a/lib/utils/cache_manage.dart b/lib/utils/cache_manage.dart index e250ab70..2c7998a3 100644 --- a/lib/utils/cache_manage.dart +++ b/lib/utils/cache_manage.dart @@ -101,7 +101,7 @@ class CacheManage { await clearLibraryCache(); Timer(const Duration(milliseconds: 500), () { SmartDialog.dismiss().then((res) { - SmartDialog.showToast('清除完成'); + SmartDialog.showToast('清除成功'); }); }); } catch (err) {