fix: 缓存清除提示错误

This commit is contained in:
orz12
2024-03-08 14:20:30 +08:00
parent 847140d98c
commit 8d1987d1c9
2 changed files with 3 additions and 6 deletions

View File

@@ -164,11 +164,8 @@ class _AboutPageState extends State<AboutPage> {
), ),
ListTile( ListTile(
onTap: () async { onTap: () async {
var cleanStatus = await CacheManage().clearCacheAll(); await CacheManage().clearCacheAll();
if (cleanStatus) { getCacheSize();
getCacheSize();
SmartDialog.showToast('清除成功');
}
}, },
title: const Text('清除缓存'), title: const Text('清除缓存'),
subtitle: Text('图片及网络缓存 $cacheSize', style: subTitleStyle), subtitle: Text('图片及网络缓存 $cacheSize', style: subTitleStyle),

View File

@@ -101,7 +101,7 @@ class CacheManage {
await clearLibraryCache(); await clearLibraryCache();
Timer(const Duration(milliseconds: 500), () { Timer(const Duration(milliseconds: 500), () {
SmartDialog.dismiss().then((res) { SmartDialog.dismiss().then((res) {
SmartDialog.showToast('清除'); SmartDialog.showToast('清除成');
}); });
}); });
} catch (err) { } catch (err) {