Skip to content

removeFile don't remove line into database #268

Open
@afiocre

Description

@afiocre

🐛 Bug Report

When i call the removeFile() i see that the cached file is deleted into /data/user/0/fr.serialtrip/cache/libCachedImageData
But not into the database libCachedImageData.db

When I see the code, i don't understand. Is it a bug ?

Future removeCachedFile(CacheObject cacheObject) async {
final provider = await _cacheInfoRepository;
final toRemove = [];
unawaited(_removeCachedFile(cacheObject, toRemove));
await provider.deleteAll(toRemove);
}

With this code unawaited(_removeCachedFile(cacheObject, toRemove)); it's impossible to delete the IDs from database (SQLite in my case) because it's not an await. So the toRemove is empty on the next line.

Configuration

Version: 2.1.1

Platform:

  • 🤖 Android

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions