mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-06-17 08:24:45 +08:00
Bug fix
This commit is contained in:
@@ -74,8 +74,8 @@ Future<void> prepareImageCaches() async {
|
||||
_imageCaches = ImageCaches();
|
||||
try {
|
||||
await _imageCaches!.init();
|
||||
} catch (e) {
|
||||
_globalLog.warning("Failed to initiailzed image caches: $e");
|
||||
} catch (e, stack) {
|
||||
_globalLog.warning("Failed to initiailzed image caches: $e\n$stack");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ class ImageCaches {
|
||||
Future<void> updateSize({bool clear = false}) async {
|
||||
if (clear) await _removeUnexist();
|
||||
final re = await _db!.rawQuery("SELECT SUM(size) AS sizes FROM images;");
|
||||
_size = re[0]["sizes"] as int;
|
||||
_size = re.isEmpty ? 0 : re[0]["sizes"] as int;
|
||||
}
|
||||
|
||||
Future<void> clear() async {
|
||||
|
||||
Reference in New Issue
Block a user