Mark preloadFile as TODO since the logic has to be reworked
This commit is contained in:
parent
228ea5990d
commit
d36b88aa23
1 changed files with 1 additions and 20 deletions
|
@ -1,10 +1,8 @@
|
|||
import 'package:photo_manager/photo_manager.dart';
|
||||
import 'package:photos/core/cache/image_cache.dart';
|
||||
import 'package:photos/core/cache/thumbnail_cache.dart';
|
||||
import 'package:photos/core/constants.dart';
|
||||
import 'package:photos/db/files_db.dart';
|
||||
import 'package:photos/models/file.dart';
|
||||
import 'package:photos/models/file_type.dart';
|
||||
|
||||
Future<void> deleteFiles(List<File> files,
|
||||
{bool deleteEveryWhere = false}) async {
|
||||
|
@ -18,24 +16,7 @@ Future<void> deleteFiles(List<File> files,
|
|||
}
|
||||
|
||||
void preloadFile(File file) {
|
||||
if (file.fileType == FileType.video) {
|
||||
return;
|
||||
}
|
||||
if (file.localID == null) {
|
||||
if (BytesLruCache.get(file) == null) {
|
||||
file.getBytes().then((data) {
|
||||
BytesLruCache.put(file, data);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (FileLruCache.get(file) == null) {
|
||||
file.getAsset().then((asset) {
|
||||
asset.file.then((assetFile) {
|
||||
FileLruCache.put(file, assetFile);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
// TODO
|
||||
}
|
||||
|
||||
void preloadLocalFileThumbnail(File file) {
|
||||
|
|
Loading…
Add table
Reference in a new issue