fix an issue where a deleted comic could not be displayed in a favorite folder.

This commit is contained in:
2024-11-11 10:40:56 +08:00
parent db2c2395de
commit f8eace4c31

View File

@@ -158,7 +158,10 @@ class ComicTile extends StatelessWidget {
image = FileImage(File(comic.cover.substring(7))); image = FileImage(File(comic.cover.substring(7)));
} else if (comic.sourceKey == 'local') { } else if (comic.sourceKey == 'local') {
var localComic = LocalManager().find(comic.id, ComicType.local); var localComic = LocalManager().find(comic.id, ComicType.local);
image = FileImage(localComic!.coverFile); if(localComic == null) {
return const SizedBox();
}
image = FileImage(localComic.coverFile);
} else { } else {
image = CachedImageProvider(comic.cover, sourceKey: comic.sourceKey); image = CachedImageProvider(comic.cover, sourceKey: comic.sourceKey);
} }