Browse Source

Formatting changes

Neeraj Gupta 4 years ago
parent
commit
0b26fe47b5
2 changed files with 8 additions and 7 deletions
  1. 1 0
      ios/Runner/AppDelegate.swift
  2. 7 7
      lib/ui/fading_app_bar.dart

+ 1 - 0
ios/Runner/AppDelegate.swift

@@ -9,6 +9,7 @@ import Flutter
   ) -> Bool {
     var flutter_native_splash = 1
     UIApplication.shared.isStatusBarHidden = false
+
     GeneratedPluginRegistrant.register(with: self)
     return super.application(application, didFinishLaunchingWithOptions: launchOptions)
   }

+ 7 - 7
lib/ui/fading_app_bar.dart

@@ -251,17 +251,17 @@ class FadingAppBarState extends State<FadingAppBar> {
     await dialog.show();
     if (file.fileType == FileType.image ||
         file.fileType == FileType.livePhoto) {
-      file.localID = (await PhotoManager.editor.saveImageWithPath(
+      final savedAsset = (await PhotoManager.editor.saveImageWithPath(
         (await getFile(file)).path,
         title: file.title,
-      ))
-          .id;
+      ));
+      file.localID = savedAsset.id;
     } else if (file.fileType == FileType.video) {
-      file.localID = (await PhotoManager.editor.saveVideo(
-        (await getFile(file)),
+      final savedAsset = (await PhotoManager.editor.saveImageWithPath(
+        (await getFile(file)).path,
         title: file.title,
-      ))
-          .id;
+      ));
+      file.localID = savedAsset.id;
     }
     await FilesDB.instance.insert(file);
     await LocalSyncService.instance.trackDownloadedFile(file);