|
@@ -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) {
|