瀏覽代碼

Mark preloadFile as TODO since the logic has to be reworked

Vishnu Mohandas 5 年之前
父節點
當前提交
d36b88aa23
共有 1 個文件被更改,包括 1 次插入20 次删除
  1. 1 20
      lib/utils/file_util.dart

+ 1 - 20
lib/utils/file_util.dart

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