fixed showing undecodable trashed item as missing from storage

This commit is contained in:
Thibault Deckers 2023-12-19 19:16:40 +01:00
parent 4c6c56e3f8
commit 2d5de662ff
2 changed files with 4 additions and 2 deletions

View file

@ -32,7 +32,8 @@ class _ErrorThumbnailState extends State<ErrorThumbnail> {
@override
void initState() {
super.initState();
_exists = entry.path != null ? File(entry.path!).exists() : SynchronousFuture(true);
final path = entry.trashDetails?.path ?? entry.path;
_exists = path != null ? File(path).exists() : SynchronousFuture(true);
}
@override

View file

@ -29,7 +29,8 @@ class _ErrorViewState extends State<ErrorView> {
@override
void initState() {
super.initState();
_exists = entry.path != null ? File(entry.path!).exists() : SynchronousFuture(true);
final path = entry.trashDetails?.path ?? entry.path;
_exists = path != null ? File(path).exists() : SynchronousFuture(true);
}
@override